// my hardware/driver requires many more.
#define POFF_UNITS 40
-#if defined( NONE ) && defined( _MSC_VER )
-# pragma message( "A sloppy coder has defined NONE as a macro!!!" )
-# undef NONE
-#elif defined( NONE )
-# pragma warn A sloppy coder has defined NONE as a macro!!!
-# undef NONE
-#endif
-
\f
////////////////////////////////////////////////////////////////////////
// Local functions.
_x_offset = fgGetInt("/sim/panel/x-offset");
_y_offset = fgGetInt("/sim/panel/y-offset");
_jitter = fgGetFloat("/sim/panel/jitter");
+ _flipx = fgGetBool("/sim/panel/flip-x");
// Do nothing if the panel isn't visible.
if ( !fgPanelVisible() ) {
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
- // gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+ if ( _flipx ) {
+ gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+ } else {
+ gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
+ }
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
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);
glPopMatrix();
}
+ // restore some original state
+ glPopAttrib();
+ glPolygonOffset(0, 0);
glDisable(GL_POLYGON_OFFSET_FILL);
}