From: ehofman Date: Sun, 19 Sep 2004 17:59:40 +0000 (+0000) Subject: Revert to CVS as of 5000 seconds ago. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de47d1a7d897ae1458c2a83bf2b3d99d147470c0;p=flightgear.git Revert to CVS as of 5000 seconds ago. --- diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index 8f34beac1..09194ef12 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -31,6 +31,7 @@ #include +#include #include #include diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index 65afdebee..a4a30ee62 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -100,6 +100,7 @@ extern void fgLatLonFormatToggle( puObject *); #if defined( TR_HIRES_SNAP) #include +extern void trRenderFrame( void ); extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start, GLfloat x_end, GLfloat y_end ); #endif @@ -373,8 +374,8 @@ void guiTogglePanel(puObject *cb) else fgSetBool("/sim/panel/visibility", true); - globals->get_renderer()->resize(fgGetInt("/sim/startup/xsize"), - fgGetInt("/sim/startup/ysize")); + fgReshape(fgGetInt("/sim/startup/xsize"), + fgGetInt("/sim/startup/ysize")); } void goodBye(puObject *) @@ -531,16 +532,15 @@ void fgHiResDump() puHideCursor(); } - FGRenderer *renderer = globals->get_renderer(); - renderer->init(); - renderer->resize( fgGetInt("/sim/startup/xsize"), - fgGetInt("/sim/startup/ysize") ); + fgInitVisuals(); + fgReshape( fgGetInt("/sim/startup/xsize"), + fgGetInt("/sim/startup/ysize") ); // we need two render frames here to clear the menu and cursor // ... not sure why but doing an extra fgRenderFrame() shouldn't // hurt anything - renderer->update( 0.0 ); - renderer->update( 0.0 ); + fgRenderFrame(); + fgRenderFrame(); // Make sure we have SSG projection primed for current view glMatrixMode(GL_MODELVIEW); @@ -631,7 +631,7 @@ void fgHiResDump() trBeginTile(tr); int curColumn = trGet(tr, TR_CURRENT_COLUMN); int curRow = trGet(tr, TR_CURRENT_ROW); - globals->get_renderer()->screendump(); + trRenderFrame(); if ( do_hud ) fgUpdateHUD( curColumn*hud_col_step, curRow*hud_row_step, (curColumn+1)*hud_col_step, (curRow+1)*hud_row_step ); @@ -668,7 +668,7 @@ void fgHiResDump() } - globals->get_renderer()->resize( width, height ); + fgReshape( width, height ); trDelete(tr); @@ -712,7 +712,7 @@ GLubyte *hiResScreenCapture( int multiplier ) float fov = oldfov / multiplier; FGViewer *v = globals->get_current_view(); fgSetDouble("/sim/current-view/field-of-view", fov); - globals->get_renderer()->init(); + fgInitVisuals(); int cur_width = fgGetInt("/sim/startup/xsize"); int cur_height = fgGetInt("/sim/startup/ysize"); if (b1) delete( b1 ); @@ -721,7 +721,7 @@ GLubyte *hiResScreenCapture( int multiplier ) int x,y; for ( y = 0; y < multiplier; y++ ) { for ( x = 0; x < multiplier; x++ ) { - globals->get_renderer()->resize( cur_width, cur_height ); + fgReshape( cur_width, cur_height ); // pan to tile rotateView( 0, (y*fov)-((multiplier-1)*fov/2), (x*fov)-((multiplier-1)*fov/2) ); fgRenderFrame(); @@ -792,9 +792,9 @@ void fgDumpSnapShot () { puHideCursor(); } - globals->get_renderer()->init(); - globals->get_renderer()->resize( fgGetInt("/sim/startup/xsize"), - fgGetInt("/sim/startup/ysize") ); + fgInitVisuals(); + fgReshape( fgGetInt("/sim/startup/xsize"), + fgGetInt("/sim/startup/ysize") ); // we need two render frames here to clear the menu and cursor // ... not sure why but doing an extra fgRenderFrame() shouldn't diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index 87fc984aa..9a3064fda 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -37,7 +37,6 @@ noinst_LIBRARIES = libMain.a libMain_a_SOURCES = \ main.cxx main.hxx \ - renderer.cxx renderer.hxx \ fg_commands.cxx fg_commands.hxx \ fg_init.cxx fg_init.hxx \ fg_io.cxx fg_io.hxx \ diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index d8b2997c8..73adb93ea 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -42,7 +42,6 @@ FGGlobals *globals; // Constructor FGGlobals::FGGlobals() : - renderer( new FGRenderer ), subsystem_mgr( new SGSubsystemMgr ), event_mgr( new SGEventMgr ), sim_time_sec( 0.0 ), @@ -96,7 +95,6 @@ FGGlobals::~FGGlobals() delete props; delete commands; delete io; - delete renderer; // make sure only to delete the initial waypoints list if it acually // still exists. @@ -159,12 +157,6 @@ void FGGlobals::set_fg_scenery (const string &scenery) { } -FGRenderer * -FGGlobals::get_renderer () const -{ - return renderer; -} - SGSubsystemMgr * FGGlobals::get_subsystem_mgr () const { diff --git a/src/Main/globals.hxx b/src/Main/globals.hxx index 13215e6ee..3077e750e 100644 --- a/src/Main/globals.hxx +++ b/src/Main/globals.hxx @@ -42,8 +42,6 @@ SG_USING_STD( string ); typedef vector string_list; -#include "renderer.hxx" - // Forward declarations // This file is included, directly or indirectly, almost everywhere in @@ -99,7 +97,6 @@ class FGGlobals private: - FGRenderer *renderer; SGSubsystemMgr *subsystem_mgr; SGEventMgr *event_mgr; @@ -220,8 +217,6 @@ public: FGGlobals(); virtual ~FGGlobals(); - virtual FGRenderer *get_renderer () const; - virtual SGSubsystemMgr *get_subsystem_mgr () const; virtual SGSubsystem *get_subsystem (const char * name); diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 0085984ea..0915f2d23 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -41,23 +41,31 @@ # include #endif +#include #include +#include +#include #include +#include #include -#include - -// Class refferences +#include #include +#include +#include #include -#include -#include -#include -#include