Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL & Cocoa Question



On Thursday, May 17, 2001, at 11:26 , Marc Monticelli wrote:
I have an OpenGLView in Cocoa application that works well the first time its window appears.
If I close the window and reopen it, I've lost the context. I do a makeCurrentContext, but the result is the same.
I have on the window, some "video noise" (I imagine my openglview)

I'm assuming that when you say 'close', you mean you end up releasing the window and all its views.
First, if you don't retain the context, it will be disposed of when the view goes away. If you have created the context separately, you will need to associate it with the new NSOpenGLView that is created in the new window. i.e. call [myOpenGLContext setView:myOpenGLView];

Andrew
__________________________________________________________________
A n d r e w P l a t z e r
A p p l i c a t i o n F r a m e w o r k s
A p p l e


References: 
 >OpenGL & Cocoa Question (From: Marc Monticelli <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.