i have a cocoa app and i am using a custom opengl view. my problem is: from time to time display lists are not availible. every 3 frame a glIsList returns GL_FALSE. the lists are generated in the awake from nib. how can this be??? is there a cocoa specific problem? :mad: :mad: :mad:
another one: i want to use selection mode to pick objects on the screen. but the rendering is senseless if the process is not in the drawGLScene but i only want to render to the selection buffer. if i execute the selection function in the drawGLScene everything works.
the first problem is driving me crazy!! hope y have experience with something like that…
Make sure your context is current when you make GL calls. If it’s not, behavior is undefined and likely to crash.
In particular, NSOpenGLView will only make its context current for -drawRect:, -reshape and -prepareOpenGL. If you wish to make GL calls at any other time, you must make the correct context current yourself. I don’t recommend it; limiting your GL calls to those three methods is much safer and cleaner.
i have analyzed the problem and found that every second frame i can’t call any functions - even cocoa functions can’t be executed - no error code - nothing - so it is a cocoa problem :eek:
do you have a simple openglview which works perfectly?
i have a custom class - subclass of openglview and the standard functions of all examples
timer is like the timer in all examples - don’t understand the world anymore :eek: :eek:
http://onesadcookie.com/book.html has an example of how to set up GL in cocoa that should work. I’m not saying it’s the best way, but it’s a working way
i know it is nonesense but in my draw functions i set some gui elements. in drawRect i have no (write) access to IBOutlets. what is the reason for that?