1
0
Fork 0

Save state before drawing '3d' panel, and then restore it after.

This commit is contained in:
curt 2002-07-22 21:09:42 +00:00
parent e85939a814
commit 493fcadacd

View file

@ -359,6 +359,10 @@ FGPanel::draw()
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(0, -POFF_UNITS);
// save some state
glPushAttrib( GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_LIGHTING_BIT
| GL_TEXTURE_BIT | GL_PIXEL_MODE_BIT );
// Draw the background
glEnable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
@ -417,6 +421,8 @@ FGPanel::draw()
glPopMatrix();
}
// restore some original state
glPopAttrib();
glDisable(GL_POLYGON_OFFSET_FILL);
}