1 // hud.cxx -- hud defines and prototypes
3 // Written by Michele America, started September 1997.
5 // Copyright (C) 1997 Michele F. America - micheleamerica@geocities.com
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 # define exception c_exception
41 #include <simgear/constants.h>
42 #include <simgear/debug/logstream.hxx>
43 //#include <simgear/math/fg_random.h>
44 //#include <simgear/math/polar3d.hxx>
46 #include <Aircraft/aircraft.hxx>
47 #include <Autopilot/newauto.hxx>
49 #include <Main/options.hxx>
51 #include <NetworkOLK/network.h>
53 #include <Scenery/scenery.hxx>
54 //#include <Time/fg_timer.hxx>
56 #if defined ( __sun__ ) || defined ( __sgi )
58 extern void *memmove(void *, const void *, size_t);
66 // The following routines obtain information concerning the aircraft's
67 // current state and return it to calling instrument display routines.
68 // They should eventually be member functions of the aircraft.
71 deque< instr_item * > HUD_deque;
73 fgTextList HUD_TextList;
74 fgLineList HUD_LineList;
75 fgLineList HUD_StippleLineList;
77 fntRenderer *HUDtext = 0;
78 float HUD_TextSize = 0;
82 static float hud_trans_alpha = 0.67f;
84 void fgHUDalphaInit( void );
90 locRECT( UINT left, UINT top, UINT right, UINT bottom);
91 RECT get_rect(void) { return rect;}
94 locRECT :: locRECT( UINT left, UINT top, UINT right, UINT bottom)
105 void drawOneLine( UINT x1, UINT y1, UINT x2, UINT y2)
113 void drawOneLine( RECT &rect)
116 glVertex2f(rect.left, rect.top);
117 glVertex2f(rect.right, rect.bottom);
122 // The following code deals with painting the "instrument" on the display
124 /* textString - Bitmap font string */
126 void textString( int x, int y, char *msg, void *font ){
130 // puDrawString ( NULL, msg, x, y );
133 glutBitmapCharacter(font, *msg);
140 /* strokeString - Stroke font string */
141 void strokeString(int x, int y, char *msg, void *font, float theta)
146 float sintheta,costheta;
152 glRotatef(theta * RAD_TO_DEG, 0.0, 0.0, 1.0);
153 sintheta = sin(theta);
154 costheta = cos(theta);
155 xx = (int)(x * costheta + y * sintheta);
156 yy = (int)(y * costheta - x * sintheta);
157 glTranslatef( xx, yy, 0);
158 glScalef(.1, .1, 0.0);
159 while( (c=*msg++) ) {
160 glutStrokeCharacter(font, c);
166 int getStringWidth ( char *str )
168 if ( HUDtext && str )
171 guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
172 return FloatToInt( r - l );
178 //========================= End of Class Implementations===================
181 // Constructs a HUD object and then adds in instruments. At the present
182 // the instruments are hard coded into the routine. Ultimately these need
183 // to be defined by the aircraft's instrumentation records so that the
184 // display for a Piper Cub doesn't show the speed range of a North American
185 // mustange and the engine readouts of a B36!
190 int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
196 int min_x = 25; //off/2;
197 int max_x = 615; //640-(off/2);
199 int max_y = 430; //480-off;
202 unsigned int text_h = 10;
203 unsigned int ladr_w2 = 60;
209 // int font_size = current_options.get_xsize() / 60;
210 int font_size = (current_options.get_xsize() > 1000) ? LARGE : SMALL;
214 FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
216 // deque < instr_item * > :: iterator first = HUD_deque.begin();
217 // deque < instr_item * > :: iterator last = HUD_deque.end();
218 // HUD_deque.erase( first, last); // empty the HUD deque
220 HUD_deque.erase( HUD_deque.begin(), HUD_deque.end()); // empty the HUD deque
225 // For now lets just hardcode the hud here.
226 // In the future, hud information has to come from the same place
227 // aircraft information came from.
229 // fgHUDSetTimeMode( hud, NIGHT );
230 // fgHUDSetBrightness( hud, BRT_LIGHT );
233 // int x = 290; /*cen_x-30*/
234 // int y = 45; /*off-5*/
235 // HIptr = (instr_item *) new fgTBI_instr( x, y, ladr_w2, text_h );
236 HIptr = (instr_item *) new fgTBI_instr( 290, 45, 60, 10 );
237 HUD_deque.insert( HUD_deque.begin(), HIptr);
239 // case 1: // Artificial Horizon
240 HIptr = (instr_item *) new HudLadder( cen_x-ladr_w2, cen_y-ladr_h2,
241 2*ladr_w2, 2*ladr_h2 );
242 HUD_deque.insert( HUD_deque.begin(), HIptr);
244 // case 4: // GYRO COMPASS
245 HIptr = (instr_item *) new hud_card( cen_x-(compass_w/2),
258 HUD_deque.insert( HUD_deque.begin(), HIptr);
261 HIptr = (instr_item *) new hud_card( max_x - 35 -15, // 15 to balance speed card
266 // HUDS_RIGHT | HUDS_VERT,
267 HUDS_LEFT | HUDS_VERT,
275 HUD_deque.insert( HUD_deque.begin(), HIptr);
278 HIptr = (instr_item *) new guage_instr( cen_x-50, // x
279 cen_y + ladr_h2 -20, // y
282 get_aileronval, // data source
283 HUDS_BOTTOM | HUDS_NOTEXT,
287 HUD_deque.insert( HUD_deque.begin(), HIptr);
289 // case 3: // Radio Altimeter
290 HIptr = (instr_item *) new hud_card( cen_x + ladr_w2 + gap + 13 + ladr_t,
295 HUDS_LEFT | HUDS_VERT,
303 HUD_deque.insert( HUD_deque.begin(), HIptr);
306 HIptr = (instr_item *) new guage_instr( cen_x -ladr_w2 -gap -13 -20 -ladr_t,
310 get_elevatorval, // data source
311 HUDS_RIGHT | HUDS_VERT | HUDS_NOTEXT,
312 -100.0, // Scale data
315 HUD_deque.insert( HUD_deque.begin(), HIptr);
318 HIptr = (instr_item *) new guage_instr( cen_x-50, // x
319 cen_y -gap -ladr_w2 -20, //-85 // y
322 get_rudderval, // data source
323 HUDS_TOP | HUDS_NOTEXT,
327 HUD_deque.insert( HUD_deque.begin(), HIptr);
330 HIptr = (instr_item *) new hud_card( min_x +10 +5, //min_x +18,
335 // HUDS_LEFT | HUDS_VERT,
336 HUDS_RIGHT | HUDS_VERT,
347 HUD_deque.insert( HUD_deque.begin(), HIptr);
350 // case 10: // Digital Mach number
351 HIptr = (instr_item *) new instr_label ( min_x , //same as speed tape
352 cen_y-(compass_w/2) -10, //below speed tape
365 HUD_deque.insert( HUD_deque.begin(), HIptr);
368 HIptr = (instr_item *) new guage_instr( min_x-10, // x
372 get_throttleval, // data source
373 // HUDS_VERT | HUDS_RIGHT | HUDS_NOTEXT,
374 HUDS_VERT | HUDS_LEFT | HUDS_NOTEXT, 100.0,
378 HUD_deque.insert( HUD_deque.begin(), HIptr);
379 // Remove this when below uncommented
381 HIptr = (instr_item *) new instr_label( 10,
395 HUD_deque.insert( HUD_deque.begin(), HIptr);
397 HIptr = (instr_item *) new lat_label( (cen_x - (compass_w/2))/2,
411 HUD_deque.insert( HUD_deque.begin(), HIptr);
413 HIptr = (instr_item *) new lon_label(((cen_x+compass_w/2)+(2*cen_x))/2,
426 HUD_deque.insert( HUD_deque.begin(), HIptr);
429 // case 10: // Digital KIAS
430 HIptr = (instr_item *) new instr_label ( 110,
444 HUD_deque.insert( HUD_deque.begin(), HIptr);
446 // case 11: // Digital Rate of Climb
447 HIptr = (instr_item *) new instr_label ( 110,
461 HUD_deque.insert( HUD_deque.begin(), HIptr);
463 // case 12: // Roll indication diagnostic
464 HIptr = (instr_item *) new instr_label ( 110,
478 HUD_deque.insert( HUD_deque.begin(), HIptr);
480 // case 13: // Angle of attack diagnostic
481 HIptr = (instr_item *) new instr_label ( 440,
495 HUD_deque.insert( HUD_deque.begin(), HIptr);
498 HIptr = (instr_item *) new instr_label ( 440,
512 HUD_deque.insert( HUD_deque.begin(), HIptr);
515 HIptr = (instr_item *) new instr_label ( 440,
529 HUD_deque.insert( HUD_deque.begin(), HIptr);
532 HIptr = (instr_item *) new instr_label( 440,
546 HUD_deque.insert( HUD_deque.begin(), HIptr);
549 HIptr = (instr_item *) new instr_label( 440,
563 HUD_deque.insert( HUD_deque.begin(), HIptr);
566 HIptr = (instr_item *) new instr_label( 440,
580 HUD_deque.insert( HUD_deque.begin(), HIptr);
583 HIptr = (instr_item *) new instr_label( 10,
597 HUD_deque.insert( HUD_deque.begin(), HIptr);
600 switch( current_options.get_tris_or_culled() ) {
602 HIptr = (instr_item *) new instr_label( 10,
618 HIptr = (instr_item *) new instr_label( 10,
637 HIptr = (instr_item *) new instr_label( 10,
651 HUD_deque.insert( HUD_deque.begin(), HIptr);
656 // if( HIptr ) { // Anything to install?
657 // HUD_deque.insert( HUD_deque.begin(), HIptr);
665 return 0; // For now. Later we may use this for an error code.
669 int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
671 // instr_item *HIptr;
676 // int max_x = 640-off;
688 // int font_size = current_options.get_xsize() / 60;
689 int font_size = (current_options.get_xsize() > 1000) ? LARGE : SMALL;
693 FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
695 // deque < instr_item * > :: iterator first = HUD_deque.begin();
696 // deque < instr_item * > :: iterator last = HUD_deque.end();
697 // HUD_deque.erase( first, last); // empty the HUD deque
698 HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
703 // For now lets just hardcode the hud here.
704 // In the future, hud information has to come from the same place
705 // aircraft information came from.
707 // fgHUDSetTimeMode( hud, NIGHT );
708 // fgHUDSetBrightness( hud, BRT_LIGHT );
715 p = new HudLadder( cen_x-ladr_w2, cen_y-ladr_h2, 2*ladr_w2, 2*ladr_h2, 1 );
716 HUD_deque.push_front( p );
718 // case 4: // GYRO COMPASS
719 p =new hud_card( cen_x-(compass_w/2),
732 HUD_deque.push_front( p );
734 p = new lat_label( (cen_x - compass_w/2)/2,
747 HUD_deque.push_front( p );
749 // p = new instr_label( 140, 450, 60, 10,
760 // HUD_deque.push_front( p );
762 p = new lon_label(((cen_x+compass_w/2)+(2*cen_x))/2,
775 HUD_deque.push_front( p );
779 p = new instr_label( x_pos, 25, 60, 10,
790 HUD_deque.push_front( p );
792 p = new instr_label( x_pos, 40, 120, 10,
803 HUD_deque.push_front( p );
805 p = new instr_label( x_pos, 55, 120, 10,
816 HUD_deque.push_front( p );
819 // p = new instr_label( x_pos, 70, 90, 10,
820 p = new instr_label( x_pos, 40, 90, 10,
831 HUD_deque.push_front( p );
835 p = new instr_label ( x_pos,
849 HUD_deque.push_front( p );
851 p = new instr_label( x_pos, 55, 40, 30,
862 HUD_deque.push_front( p );
864 if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
865 strcpy(units, " ft");
869 p = new instr_label( x_pos, 40, 40, 10,
880 HUD_deque.push_front( p );
882 p = new instr_label( x_pos, 25, 40, 10,
893 HUD_deque.push_front( p );
895 p = new instr_label( x_pos, 10, 60, 10,
906 HUD_deque.push_front( p );
908 p = new fgTBI_instr( 290, 55, 60, 10 ); // 270
909 HUD_deque.push_front( p );
911 p = new guage_instr( 270, //250, // x
912 390, //360, //400, //45, //420, // y
915 get_aileronval, // data source
916 HUDS_BOTTOM | HUDS_NOTEXT,
920 HUD_deque.push_front( p );
922 p = new guage_instr( 20, // x
926 get_elevatorval, // data source
927 HUDS_RIGHT | HUDS_VERT | HUDS_NOTEXT,
928 -100.0, // Scale data
931 HUD_deque.push_front( p );
933 p = new guage_instr( 270, //250, // x
937 get_rudderval, // data source
938 HUDS_TOP | HUDS_NOTEXT,
942 HUD_deque.push_front( p );
944 p = new guage_instr( 600, // x
948 get_throttleval, // data source
949 HUDS_VERT | HUDS_LEFT | HUDS_NOTEXT,
953 HUD_deque.push_front( p );
955 return 0; // For now. Later we may use this for an error code.
958 int global_day_night_switch = DAY;
960 void HUD_masterswitch( bool incr )
962 if ( current_options.get_hud_status() ) {
963 if ( global_day_night_switch == DAY ) {
964 global_day_night_switch = NIGHT;
966 current_options.set_hud_status( false );
969 current_options.set_hud_status( true );
970 global_day_night_switch = DAY;
974 void HUD_brightkey( bool incr_bright )
976 instr_item *pHUDInstr = HUD_deque[0];
977 int brightness = pHUDInstr->get_brightness();
979 if( current_options.get_hud_status() ) {
984 brightness = BRT_BLACK;
988 brightness = BRT_LIGHT;
992 brightness = BRT_MEDIUM;
996 brightness = BRT_DARK;
1000 brightness = BRT_BLACK;
1006 brightness = BRT_MEDIUM;
1010 brightness = BRT_DARK;
1014 brightness = BRT_BLACK;
1018 brightness = BRT_LIGHT;
1022 current_options.set_hud_status(0);
1026 current_options.set_hud_status(true);
1029 pHUDInstr->SetBrightness( brightness );
1033 #define fgAP_CLAMP(val,min,max) ( (val) = (val) > (max) ? (max) : (val) < (min) ? (min) : (val) )
1035 static puDialogBox *HUDalphaDialog;
1036 static puText *HUDalphaText;
1037 static puSlider *HUDalphaHS0;
1038 //static puText *HUDtextText;
1039 //static puSlider *HUDalphaHS1;
1040 static char SliderText[2][ 8 ];
1042 static void alpha_adj( puObject *hs ) {
1045 hs-> getValue ( &val ) ;
1046 fgAP_CLAMP ( val, 0.1, 1.0 ) ;
1047 // printf ( "maxroll_adj( %p ) %f %f\n", hs, val, MaxRollAdjust * val ) ;
1048 hud_trans_alpha = val;
1049 sprintf( SliderText[ 0 ], "%05.2f", hud_trans_alpha );
1050 HUDalphaText -> setLabel ( SliderText[ 0 ] ) ;
1053 void fgHUDalphaAdjust( puObject * ) {
1054 current_options.set_anti_alias_hud(1);
1055 FG_PUSH_PUI_DIALOG( HUDalphaDialog );
1058 static void goAwayHUDalphaAdjust (puObject *)
1060 FG_POP_PUI_DIALOG( HUDalphaDialog );
1063 static void cancelHUDalphaAdjust (puObject *)
1065 current_options.set_anti_alias_hud(0);
1066 FG_POP_PUI_DIALOG( HUDalphaDialog );
1069 // Done once at system initialization
1070 void fgHUDalphaInit( void ) {
1072 // printf("fgHUDalphaInit\n");
1073 #define HORIZONTAL FALSE
1077 int DialogWidth = 240;
1079 char Label[] = "HUD Adjuster";
1082 int labelX = (DialogWidth / 2) -
1083 (puGetStringWidth( puGetDefaultLabelFont(), Label ) / 2);
1088 int slider_width = 220;
1089 int slider_title_x = 15;
1090 int slider_value_x = 160;
1091 float slider_delta = 0.05f;
1093 puFont HUDalphaLegendFont;
1094 puFont HUDalphaLabelFont;
1095 puGetDefaultFonts ( &HUDalphaLegendFont, &HUDalphaLabelFont );
1097 HUDalphaDialog = new puDialogBox ( DialogX, DialogY ); {
1098 int horiz_slider_height = puGetStringHeight (HUDalphaLabelFont) +
1099 puGetStringDescender (HUDalphaLabelFont) +
1100 PUSTR_TGAP + PUSTR_BGAP + 5;
1103 HUDalphaFrame = new puFrame ( 0, 0,
1105 85 + nSliders * horiz_slider_height );
1108 HUDalphaDialogMessage = new puText ( labelX,
1110 * horiz_slider_height );
1111 HUDalphaDialogMessage -> setDefaultValue ( Label );
1112 HUDalphaDialogMessage -> getDefaultValue ( &s );
1113 HUDalphaDialogMessage -> setLabel ( s );
1115 HUDalphaHS0 = new puSlider ( slider_x, slider_y,
1116 slider_width, HORIZONTAL ) ;
1117 HUDalphaHS0-> setDelta ( slider_delta ) ;
1118 HUDalphaHS0-> setValue ( hud_trans_alpha ) ;
1119 HUDalphaHS0-> setCBMode ( PUSLIDER_DELTA ) ;
1120 HUDalphaHS0-> setCallback ( alpha_adj ) ;
1123 HUDalphaTitle = new puText ( slider_title_x, slider_y ) ;
1124 HUDalphaTitle-> setDefaultValue ( "Alpha" ) ;
1125 HUDalphaTitle-> getDefaultValue ( &s ) ;
1126 HUDalphaTitle-> setLabel ( s ) ;
1128 HUDalphaText = new puText ( slider_value_x, slider_y ) ;
1129 sprintf( SliderText[ 0 ], "%05.2f", hud_trans_alpha );
1130 HUDalphaText-> setLabel ( SliderText[ 0 ] ) ;
1134 HUDalphaOkButton = new puOneShot ( 10, 10, 60, 45 );
1135 HUDalphaOkButton-> setLegend ( gui_msg_OK );
1136 HUDalphaOkButton-> makeReturnDefault ( TRUE );
1137 HUDalphaOkButton-> setCallback ( goAwayHUDalphaAdjust );
1140 HUDalphaNoButton = new puOneShot ( 160, 10, 230, 45 );
1141 HUDalphaNoButton-> setLegend ( gui_msg_CANCEL );
1142 HUDalphaNoButton-> setCallback ( cancelHUDalphaAdjust );
1144 FG_FINALIZE_PUI_DIALOG( HUDalphaDialog );
1149 void fgHUDReshape(void) {
1153 HUD_TextSize = current_options.get_xsize() / 60;
1155 HUDtext = new fntRenderer();
1156 HUDtext -> setFont ( guiFntHandle ) ;
1157 HUDtext -> setPointSize ( HUD_TextSize ) ;
1158 HUD_TextList.setFont( HUDtext );
1162 static void set_hud_color(float r, float g, float b) {
1163 current_options.get_anti_alias_hud() ?
1164 glColor4f(r,g,b,hud_trans_alpha) :
1170 // Performs a once around the list of calls to instruments installed in
1171 // the HUD object with requests for redraw. Kinda. It will when this is
1174 void fgUpdateHUD( void ) {
1176 // int day_night_sw = current_aircraft.controls->day_night_switch;
1177 int day_night_sw = global_day_night_switch;
1178 int hud_displays = HUD_deque.size();
1179 instr_item *pHUDInstr;
1182 if( !hud_displays ) { // Trust everyone, but ALWAYS cut the cards!
1186 HUD_TextList.erase();
1187 HUD_LineList.erase();
1188 // HUD_StippleLineList.erase();
1190 pHUDInstr = HUD_deque[0];
1191 brightness = pHUDInstr->get_brightness();
1192 // brightness = HUD_deque.at(0)->get_brightness();
1194 glMatrixMode(GL_PROJECTION);
1198 gluOrtho2D(0, 640, 0, 480);
1199 glMatrixMode(GL_MODELVIEW);
1203 glDisable(GL_DEPTH_TEST);
1204 glDisable(GL_LIGHTING);
1206 if( current_options.get_anti_alias_hud() ) {
1207 glEnable(GL_LINE_SMOOTH);
1208 // glEnable(GL_BLEND);
1209 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
1210 glHint(GL_LINE_SMOOTH_HINT,GL_DONT_CARE);
1216 if( day_night_sw == DAY) {
1220 set_hud_color (0.1f, 0.9f, 0.1f);
1224 set_hud_color (0.1f, 0.7f, 0.0f);
1228 set_hud_color (0.0f, 0.6f, 0.0f);
1232 set_hud_color( 0.0f, 0.0f, 0.0f);
1236 set_hud_color (0.1f, 0.9f, 0.1f);
1239 if( day_night_sw == NIGHT) {
1243 set_hud_color (0.9f, 0.1f, 0.1f);
1247 set_hud_color (0.7f, 0.0f, 0.1f);
1251 set_hud_color (0.6f, 0.0f, 0.0f);
1255 set_hud_color( 0.0f, 0.0f, 0.0f);
1259 set_hud_color (0.6f, 0.0f, 0.0f);
1261 } else { // Just in case default
1262 set_hud_color (0.1f, 0.9f, 0.1f);
1266 deque < instr_item * > :: iterator current = HUD_deque.begin();
1267 deque < instr_item * > :: iterator last = HUD_deque.end();
1269 for ( ; current != last; ++current ) {
1270 pHUDInstr = *current;
1272 if( pHUDInstr->enabled()) {
1273 // fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d Status %d\n",
1274 // hud->code, hud->status );
1279 char *gmt_str = get_formated_gmt_time();
1280 HUD_TextList.add( fgText(40, 10, gmt_str) );
1282 #ifdef FG_NETWORK_OLK
1283 if ( net_hud_display ) {
1290 // extern bool fgAPAltitudeEnabled( void );
1291 // extern bool fgAPHeadingEnabled( void );
1292 // extern bool fgAPWayPointEnabled( void );
1293 // extern char *fgAPget_TargetDistanceStr( void );
1294 // extern char *fgAPget_TargetHeadingStr( void );
1295 // extern char *fgAPget_TargetAltitudeStr( void );
1296 // extern char *fgAPget_TargetLatLonStr( void );
1299 // char scratch[128];
1300 // HUD_TextList.add( fgText( "AUTOPILOT", 20, apY) );
1302 if( current_autopilot->get_HeadingEnabled() ) {
1303 HUD_TextList.add( fgText( 40, apY,
1304 current_autopilot->get_TargetHeadingStr()) );
1307 if( current_autopilot->get_AltitudeEnabled() ) {
1308 HUD_TextList.add( fgText( 40, apY,
1309 current_autopilot->get_TargetAltitudeStr()) );
1312 if( current_autopilot->get_HeadingMode() ==
1313 FGAutopilot::FG_HEADING_WAYPOINT )
1316 wpstr = current_autopilot->get_TargetWP1Str();
1317 if ( strlen( wpstr ) ) {
1318 HUD_TextList.add( fgText( 40, apY, wpstr ) );
1321 wpstr = current_autopilot->get_TargetWP2Str();
1322 if ( strlen( wpstr ) ) {
1323 HUD_TextList.add( fgText( 40, apY, wpstr ) );
1326 wpstr = current_autopilot->get_TargetWP3Str();
1327 if ( strlen( wpstr ) ) {
1328 HUD_TextList.add( fgText( 40, apY, wpstr ) );
1333 HUD_TextList.draw();
1335 HUD_LineList.draw();
1337 // glEnable(GL_LINE_STIPPLE);
1338 // glLineStipple( 1, 0x00FF );
1339 // HUD_StippleLineList.draw();
1340 // glDisable(GL_LINE_STIPPLE);
1342 if( current_options.get_anti_alias_hud() ) {
1343 // glDisable(GL_BLEND);
1344 glDisable(GL_LINE_SMOOTH);
1348 glEnable(GL_DEPTH_TEST);
1349 glEnable(GL_LIGHTING);
1350 glMatrixMode(GL_PROJECTION);
1352 glMatrixMode(GL_MODELVIEW);