Hi Chris,

If glGetError() is crashing then it suggests that you are calling this
code from a thread that doesn't have valid graphics context, which is
a bug at the application level, rather than SceneView itself.

Robert.

On Fri, Sep 19, 2008 at 4:09 PM, Chris Denham <[EMAIL PROTECTED]> wrote:
> Just found a little problem with SceneView.cpp crashing with NULL pointer
> exception because it tried to use a NULL returned by gluErrorString().
> I noticed that there is GL error reporting code in State.cpp that probably
> should have be used here.
> Mods shown below, and I have attached modified osg2.6 SceneView.cpp
>
> //////////////////BEFORE//////////////////////
>      GLenum errorNo = glGetError();
>       if (errorNo!=GL_NO_ERROR)
>       {
>           osg::notify(WARN)<<"Warning: detected OpenGL error
> '"<<gluErrorString(errorNo)<<"'"<< std::endl;
>
>           // go into debug mode of OGL error in a fine grained way to help
>           // track down OpenGL errors.
>           state->setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE);
>       }
>   }
> /////////////AFTER////////////////////////////
>       if (state->checkGLErrors("end of SceneView::draw()"))
>       {
>           // go into debug mode of OGL error in a fine grained way to help
>           // track down OpenGL errors.
>           state->setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE);
>       }
> //////////////////////////////////////////////////////
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to