From: curt Date: Sun, 17 May 1998 16:58:12 +0000 (+0000) Subject: Added a View Frustum Culling ratio display to the hud. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5c03d933a3814b99ab59be2ecab9f2a3660f32fe;p=flightgear.git Added a View Frustum Culling ratio display to the hud. --- diff --git a/Cockpit/cockpit.cxx b/Cockpit/cockpit.cxx index 10f725d37..9169c2b40 100644 --- a/Cockpit/cockpit.cxx +++ b/Cockpit/cockpit.cxx @@ -41,6 +41,7 @@ #include #include #include
+#include
#include #include #include @@ -227,6 +228,15 @@ double get_fov( void ) return o->fov; } +double get_vfc_ratio( void ) +{ + fgVIEW *v; + + v = ¤t_view; + + return v->vfc_ratio; +} + bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) { fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n"); @@ -264,9 +274,12 @@ void fgCockpitUpdate( void ) } /* $Log$ -/* Revision 1.7 1998/05/16 13:04:13 curt -/* New updates from Charlie Hotchkiss. +/* Revision 1.8 1998/05/17 16:58:12 curt +/* Added a View Frustum Culling ratio display to the hud. /* + * Revision 1.7 1998/05/16 13:04:13 curt + * New updates from Charlie Hotchkiss. + * * Revision 1.6 1998/05/13 18:27:53 curt * Added an fov to hud display. * diff --git a/Cockpit/hud.cxx b/Cockpit/hud.cxx index 8a3c7c48c..830065453 100644 --- a/Cockpit/hud.cxx +++ b/Cockpit/hud.cxx @@ -1473,7 +1473,7 @@ void HudLadder :: draw( void ) // mustange and the engine readouts of a B36! // -#define INSTRDEFS 16 +#define INSTRDEFS 17 int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) { @@ -1767,6 +1767,22 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) loc.top = 100; // Ignore loc.right = 500; // Ignore loc.bottom = 25; + HIptr = (instr_item *) new instr_label( loc, get_vfc_ratio, + "%.2f", + "VFC Ratio = ", + NULL, + ReadTOP, + RIGHT_JUST, + SMALL, + 0, + TRUE ); + break; + + case 17: + loc.left = 10; + loc.top = 100; // Ignore + loc.right = 500; // Ignore + loc.bottom = 40; HIptr = (instr_item *) new instr_label( loc, get_fov, "%.1f", "FOV = ", @@ -1899,9 +1915,12 @@ void fgUpdateHUD( void ) { } /* $Log$ -/* Revision 1.9 1998/05/16 13:04:14 curt -/* New updates from Charlie Hotchkiss. +/* Revision 1.10 1998/05/17 16:58:12 curt +/* Added a View Frustum Culling ratio display to the hud. /* + * Revision 1.9 1998/05/16 13:04:14 curt + * New updates from Charlie Hotchkiss. + * * Revision 1.8 1998/05/13 18:27:54 curt * Added an fov to hud display. * diff --git a/Cockpit/hud.hxx b/Cockpit/hud.hxx index a3447e397..0e7f186eb 100644 --- a/Cockpit/hud.hxx +++ b/Cockpit/hud.hxx @@ -149,6 +149,7 @@ extern double get_lat_min ( void ); extern double get_longitude ( void ); extern double get_long_min ( void ); extern double get_fov ( void ); +extern double get_vfc_ratio ( void ); enum hudinstype{ HUDno_instr, HUDscale, @@ -445,9 +446,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day ); #endif // _HUD_H /* $Log$ -/* Revision 1.4 1998/05/16 13:04:15 curt -/* New updates from Charlie Hotchkiss. +/* Revision 1.5 1998/05/17 16:58:13 curt +/* Added a View Frustum Culling ratio display to the hud. /* + * Revision 1.4 1998/05/16 13:04:15 curt + * New updates from Charlie Hotchkiss. + * * Revision 1.3 1998/05/13 18:27:55 curt * Added an fov to hud display. *