[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #22706] NSOpenGLView broken ?

From: Xavier Glattard
Subject: [bug #22706] NSOpenGLView broken ?
Date: Tue, 01 Apr 2008 07:53:05 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/20070312 Firefox/

Follow-up Comment #5, bug #22706 (project gnustep):

You're right : all examples of GLView use are different !

Two versions of BasicOpenGLView.m :
And (with no prepareOpenGL) :
But :

In Cocoa drawing guide :
<< As with other views, you use your OpenGL views drawRect: method to draw
the content of your view. When your drawRect: method is invoked, the
environment is automatically configured for drawing using the OpenGL graphics
context associated with your view. >>

I think most examples don't use NSOpenGLView properly : they use it as an
ordinary View, which it is not.

In the page you cite Apple gives a sample OpenGLView implementation. It's not
exactly like mine, but they use [lockFocus] and [prepareOpenGL].

About [prepareOpenGL] it is said :
<< This method is called only once after the OpenGL context is made the
current context. >>
I think this should be done as soon as possible, ie when the context is set
in [setOpenGLContext]. But it might be done later in [lockFocus] as it is not
supposed to be used before. I dont know.
The sample implementation never sends [prepareOpenGL] but it is said : <<
after creating the NSOpenGLContext object >>

Really looks like they aren't sure :-)


Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]