// all C++.
//
void fgUpdateHUD( void ) {
+ fgUpdateHUD( 0.0f, 0.0f, 640.0f, 480.0f );
+}
+
+void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
+ GLfloat x_end, GLfloat y_end )
+{
int brightness;
// int day_night_sw = current_aircraft.controls->day_night_switch;
int day_night_sw = global_day_night_switch;
glPushMatrix();
glLoadIdentity();
- gluOrtho2D(0, 640, 0, 480);
+ gluOrtho2D(x_start, x_end, y_start, y_end);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
extern int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ );
extern int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ );
extern void fgUpdateHUD( void );
+extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
+ GLfloat x_end, GLfloat y_end );
extern void drawOneLine ( UINT x1, UINT y1, UINT x2, UINT y2);
extern void drawOneLine ( RECT &rect);
/**
* Update the panel.
*/
+void FGPanel::update ()
+{
+ update(_winx, _winw, _winy, _winh);
+}
+
+
void
-FGPanel::update ()
+FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
{
// Do nothing if the panel isn't visible.
if (!fgPanelVisible())
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- gluOrtho2D(_winx, _winx + _winw, _winy, _winy + _winh);
+ gluOrtho2D(winx, winx + winw, winy, winy + winh);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
virtual void bind ();
virtual void unbind ();
virtual void update ();
+ virtual void update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh);
// transfer pointer ownership!!!
virtual void addInstrument (FGPanelInstrument * instrument);
FGNewMat::~FGNewMat ( void ) {
}
+
istream&
operator >> ( istream& in, FGNewMat& m )
{