PDA

View Full Version : OpenGL function calls without available contexts ...



Groovounet
09-19-2007, 02:30 AM
I am working on a software to add in a new OpenGL renderer witch will replace the previous one. Windows version is now done but I start the MacOS port.

The old OpenGL renderer was quite a mess wish OpenGL call everywhere. With the new renderer, some functions remains lost in the code (I should clean up, that's for later) but under MacOS, each time one of this function are called, the program stop on it.

Actually, the new renderer use is own thread so that there isn't any opengl context available when those lost functions are called. Under Windows, there are simply discard, but under MacOS is crash.

Crash when OpenGL calls when no context bind under MacOS, is it what I should expect?

Komat
09-19-2007, 03:49 AM
Originally posted by Groovounet:
Crash when OpenGL calls when no context bind under MacOS, is it what I should expect? The specification states that when the context is not bound, issuing OGL commands results in undefined behavior. So both discarding and crash are valid behaviors.

OneSadCookie
09-20-2007, 05:27 AM
And yes, Mac OS X will generally crash in this situation.

Groovounet
09-20-2007, 09:46 AM
Thank. Accordingly I create a dummy context and it work for now.