[osg-users] glGetString returning NULL

Gordon Tomlinson gordon at gordon-tomlinson.com
Thu Jul 31 02:34:52 PDT 2008


This will in most case always return NULL in OSG 2.x and above

You Have to do OpenGL calls where in the Processes/Thread that has the
OpenGL context  which in OSG is the Draw Processes, so you have to do
anything with OpenGL in  Draw Call callbacks

You cannot do OpenGL calls in the App Process/Thread as your doing below (
UNLESS you have OSG in Single Thread MODE )



__________________________________________________________
Gordon Tomlinson 

gordon at GordonTomlinson.com
IM: gordon3dBrit at 3dscenegraph.com
www.vis-sim.com www.gordontomlinson.com 
__________________________________________________________

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of sherman
wilcox
Sent: Wednesday, July 30, 2008 8:29 PM
To: OpenSceneGraph Users
Subject: [osg-users] glGetString returning NULL

Running latest version of OSG in SVN, calling glGetString(...) from
main render loop (single threaded osgViewer). Like this:

  while(viewer.done() == false)
  {
    viewer.frame();

    char* extensions = (char*)glGetString(GL_EXTENSIONS);
  }


extensions is always NULL. Am I doing something wrong here? Could
someone else test this?
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list