panelStateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
state.pushStateSet(panelStateSet.get());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
FGLight *l = (FGLight *)(globals->get_subsystem("lighting"));
sgCopyVec4( panel_color, l->scene_diffuse().data());
if (_bg != 0) {
state.pushStateSet(_bg.get());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
glBegin(GL_POLYGON);
glTexCoord2f(0.0, 0.0); glVertex2f(WIN_X, WIN_Y);
glTexCoord2f(1.0, 0.0); glVertex2f(WIN_X + _width, WIN_Y);
glEnd();
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
} else {
for (int i = 0; i < 4; i ++) {
// top row of textures...(1,3,5,7)
state.pushStateSet(_mbg[i*2].get());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
glBegin(GL_POLYGON);
glTexCoord2f(0.0, 0.0); glVertex2f(WIN_X + (_width/4) * i, WIN_Y + (_height/2));
glTexCoord2f(1.0, 0.0); glVertex2f(WIN_X + (_width/4) * (i+1), WIN_Y + (_height/2));
glEnd();
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
// bottom row of textures...(2,4,6,8)
state.pushStateSet(_mbg[i*2+1].get());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
glBegin(GL_POLYGON);
glTexCoord2f(0.0, 0.0); glVertex2f(WIN_X + (_width/4) * i, WIN_Y);
glTexCoord2f(1.0, 0.0); glVertex2f(WIN_X + (_width/4) * (i+1), WIN_Y);
glEnd();
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
}
}
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
// Draw yellow "hotspots" if directed to. This is a panel authoring
// feature; not intended to be high performance or to look good.
state.pushStateSet(hotspotStateSet.get());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_COLOR_MATERIAL);
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
}
}
transform();
state.pushStateSet(_texture.getTexture());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
glBegin(GL_POLYGON);
if (_emissive) {
glEnd();
state.popStateSet();
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
+
}
}
{
state.pushStateSet(getStateSet());
state.apply();
-
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
if((fgGetBool("/sim/atc/enabled"))
|| (fgGetBool("/sim/ai-traffic/enabled")))
{
state.pushStateSet(getStateSet());
state.apply();
+ state.setActiveTextureUnit(0);
+ state.setClientActiveTextureUnit(0);
glPushAttrib(GL_ALL_ATTRIB_BITS);
glPushClientAttrib(~0u);
|| fgGetBool("sim/sceneryloaded-override");
if ( idle_state < 1000 || !scenery_loaded ) {
+ if (sceneView.valid() && sceneView->getState()) {
+ sceneView->getState()->setActiveTextureUnit(0);
+ sceneView->getState()->setClientActiveTextureUnit(0);
+ }
// still initializing, draw the splash screen
glPushAttrib(GL_ALL_ATTRIB_BITS);
glPushClientAttrib(~0u);