[osg-users] glGetString returning NULL
pmartz at skew-matrix.com
Thu Jul 31 09:45:23 PDT 2008
> Thanks for the reply - I am running osgViewer in single threaded mode
> - still returns NULL. The drawable trick works as expected,
> but I don't understand why this doesn't work in the main
> render loop when in single threaded mode. I *think* this
> worked in 2.4. Almost positive.
> Anyway, here's a simple example. glGetString fails in the
> loop but succeeds in the drawable. Note the usage of single
> threaded mode. I'm not so concerned about having to move this
> code to a drawable, but perhaps this is indicative of a larger issue?
I agree it seems odd that you don't have a current context in this case. To
understand the issue, try setting a breakpoint at the MakeCurrent call;
somewhere up the call stack, you should find an explanation for why it is
being set to NULL each frame.
Another option for you is to use a camera post draw callback; it is executed
while the draw thread has a current context.
More information about the osg-users