X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCockpit%2Fpanel.cxx;h=7c7dd810c690e1f21119b43f8657453db7046f5f;hb=8a089f6d6f9e7851e73fd118cb9a5f5583cfe517;hp=9c39626ee6bd1dd4250047400a198064a1169b36;hpb=8e5f3ac8a333a971d7f8104a387426c3bc47a014;p=flightgear.git diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index 9c39626ee..7c7dd810c 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -60,9 +61,6 @@ #include
#include -#include "hud.hxx" - - #define WIN_X 0 #define WIN_Y 0 #define WIN_W 1024 @@ -273,6 +271,7 @@ FGPanel::update (double dt) void FGPanel::update (osg::State& state, GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh) { + using namespace osg; // Calculate accelerations // and jiggle the panel accordingly // The factors and bounds are just @@ -284,12 +283,13 @@ FGPanel::update (osg::State& state, GLfloat winx, GLfloat winw, GLfloat winy, GL glMatrixMode(GL_PROJECTION); glPushMatrix(); - glLoadIdentity(); + Matrixf proj; if ( _flipx->getBoolValue() ) { - gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */ + proj = Matrixf::ortho2D(winx + winw, winx, winy + winh, winy); /* up side down */ } else { - gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */ + proj = Matrixf::ortho2D(winx, winx + winw, winy, winy + winh); /* right side up */ } + glLoadMatrix(proj.ptr()); glMatrixMode(GL_MODELVIEW); glPushMatrix();