-FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
-{
- // Calculate accelerations
- // and jiggle the panel accordingly
- // The factors and bounds are just
- // initial guesses; using sqrt smooths
- // out the spikes.
- double x_offset = _x_offset->getIntValue();
- double y_offset = _y_offset->getIntValue();
-
-#if 0
- if (_jitter->getFloatValue() != 0.0) {
- double a_x_pilot = current_aircraft.fdm_state->get_A_X_pilot();
- double a_y_pilot = current_aircraft.fdm_state->get_A_Y_pilot();
- double a_z_pilot = current_aircraft.fdm_state->get_A_Z_pilot();
-
- double a_zx_pilot = a_z_pilot - a_x_pilot;
-
- int x_adjust = int(sqrt(fabs(a_y_pilot) * _jitter->getFloatValue())) *
- (a_y_pilot < 0 ? -1 : 1);
- int y_adjust = int(sqrt(fabs(a_zx_pilot) * _jitter->getFloatValue())) *
- (a_zx_pilot < 0 ? -1 : 1);
-
- // adjustments in screen coordinates
- x_offset += x_adjust;
- y_offset += y_adjust;
- }
-#endif
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- if ( _flipx->getBoolValue() ) {
- 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();
- glLoadIdentity();
-
- glTranslated(x_offset, y_offset, 0);
-
- draw();
-
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- ssgForceBasicState();
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-}
-
-void
-FGPanel::draw()