[osg-users] glGetString returning NULL

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


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

 

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

 

__________________________________________________________
Gordon Tomlinson 

 <mailto:gordon at GordonTomlinson.com> gordon at GordonTomlinson.com
IM:  <mailto:gordon3dBrit at 3dscenegraph.com> gordon3dBrit at 3dscenegraph.com
 <http://www.vis-sim.com/> www.vis-sim.com
<http://www.gordontomlinson.com/> www.gordontomlinson.com 

__________________________________________________________

 

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Adrian Egli
OpenSceneGraph (3D)
Sent: Thursday, July 31, 2008 2:20 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] glGetString returning NULL

 

Hi, 
i had similar problem, the graphic context was no longer current/ available.

if you need the extensions: have a look at osg::GL2Extensions class or
osg::GLExtensions class, 
work around: custom drawable object, in the drawimplementation method add
the glGetString,.. 
/adrian

2008/7/31 sherman wilcox <wilcox.sherman at gmail.com>

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




-- 
********************************************
Adrian Egli

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080731/3a697288/attachment-0003.htm>


More information about the osg-users mailing list