• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OpenGL & Cocoa Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL & Cocoa Question


  • Subject: Re: OpenGL & Cocoa Question
  • From: Marc Monticelli <email@hidden>
  • Date: Fri, 18 May 2001 10:38:50 +0200

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.

No. The flag "release when close" is not set. When I call [win makeKeyAndOrderfront:sender]; the window "reappear" with all controls with the same variables berfore I close(the window is bufferized, but not draw on the screen).

First, if you don't retain the context, it will be disposed of when the view goes away.

Ok, I will do that

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];

thanks

...Marc


References: 
 >Re: OpenGL & Cocoa Question (From: Andrew Platzer <email@hidden>)

  • Prev by Date: Error codes?
  • Next by Date: Menu bar
  • Previous by thread: Re: OpenGL & Cocoa Question
  • Next by thread: rangeOfString question
  • Index(es):
    • Date
    • Thread