[osg-users] OpenGL and OSG inconsistent in State::reset ??

Robert Osfield robert.osfield at gmail.com
Fri Mar 13 04:42:12 PDT 2009

Hi Martin,

The State::reset() is just a reset of internal values, it's not a rest
of OpenGL.  The OSG doesn't normally call reset() but it can be useful
to use it if you are integrating the OSG with other OpenGL code.  If
you are doing such an integration this it's your responsibility to
keep the state in sync when entering and leaving OpenGL rendering

I would recommend only attempting OpenGL/OSG integration if your
really really have to.  There are lots of caveats with doing so, and
you need to know how OpenGL as well the OSG manage OpenGL state to
ensure that they keep in sync.

I would recommend avoiding OpenGL integration if you can, it would be
much simpler for yourself, and much less work for us trying to support
your efforts.


On Fri, Mar 13, 2009 at 11:17 AM, Großer Martin <grosser.martin at gmx.de> wrote:
> Hello,
> a little question about the State. I look at the code and find the
> function reset. In this function is set the _currentActiveTextureUnit
> with 0. But OpenGL isn't calling. See the following comment from the
> source code:
> // reset active texture unit values without calling OpenGL
> But I think the problem is the consistence between OpenGL and OSG after
> calling reset. OSG has the active texture 0 and in the OpenGL state
> there is GL_TEXTUER2_ARB?
> What is behind all this?
> Cheers, Martin
> _______________________________________________
> 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