[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:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 |
Follow-up Comment #5, bug #22706 (project gnustep):
You're right : all examples of GLView use are different !
Two versions of BasicOpenGLView.m :
http://developer.apple.com/samplecode/CocoaGL/listing4.html
http://developer.apple.com/samplecode/Custom_Cocoa_OpenGL/listing2.html
And (with no prepareOpenGL) :
http://developer.apple.com/samplecode/BoingX/listing4.html
But :
http://developer.apple.com/samplecode/OpenGLFilterBasicsCocoa/listing1.html
In Cocoa drawing guide :
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/QuartzOpenGL/chapter_10_section_3.html#//apple_ref/doc/uid/TP40003290-CH211-DontLinkElementID_93
<< 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:
<http://savannah.gnu.org/bugs/?22706>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #22706] NSOpenGLView broken ?,
Xavier Glattard <=