> This suggests that when pushing and popping state in order for Qt to draw
> its widgets, something is not pushed/popped correctly, probably GL_LIGHTING,
> GL_LIGHT0-GL_LIGHT7 or something like that? Perhaps glShadeModel? ...
Hi
yes indeed, something was killing off the GL_LIGHTING and GL_LIGHT0
flag. And it was something rather unusual.
Turns out the embeddedGraphicsView somehow calls into SceneView for
rendering. SceneView is marked as "deprecated" in the DoxyGen
documentation - maybe because it's the old single threaded rendering
path?
Near the end of SceneView::draw() we find the following peculiarity.
// re apply the defalt OGL state.
state->popAllStateSets();
state->apply();
This resets the state to the OpenGL default - and turns off my
lighting ! This is the only place in all of OpenSceneGraph() that
popAllStateSets is being used - I did a full search.
So I wonder what I should do about that.
And why does this not also screw up all other code samples that make
use of the embeddedGraphicsView - like e.g. the regular osgviewerQT ?
Christian
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org