Added support for automatic creation of global StateAttributes to osg::State,
these global attributes are created by cloning any attributes which are applied during rendering, the clone in a shallow copy, which will set up default valus for that attribute. This should prevent attribute bleed from one stateset to the next when the global StateSet doesn't contain an attribute used within the scene graph.
This commit is contained in:
@@ -572,10 +572,13 @@ void displaytext(int x, int y, char *s)
|
||||
|
||||
void Viewer::showStats()
|
||||
{
|
||||
|
||||
static GLfloat tmax=100;
|
||||
glViewport(0,0,ww,wh);
|
||||
float vh = wh;
|
||||
|
||||
//glPushAttrib (GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_LIGHTING_BIT | GL_ENABLE_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
glDisable( GL_DEPTH_TEST ); // to see the stats always
|
||||
glDisable( GL_ALPHA_TEST );
|
||||
glDisable( GL_LIGHTING );
|
||||
@@ -811,6 +814,9 @@ void Viewer::showStats()
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPopMatrix();
|
||||
|
||||
//glPopAttrib ();
|
||||
|
||||
}
|
||||
|
||||
void Viewer::display()
|
||||
|
||||
Reference in New Issue
Block a user