Re: OpenGL & Cocoa Question
Re: OpenGL & Cocoa Question
- Subject: Re: OpenGL & Cocoa Question
- From: Andrew Platzer <email@hidden>
- Date: Thu, 17 May 2001 18:22:56 -0700
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