//
// Written by Curtis Olson, started July 2000.
//
-// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
#include <simgear/misc/sg_path.hxx>
#include "globals.hxx"
+#include "renderer.hxx"
#include "viewmgr.hxx"
#include "fg_props.hxx"
// Constructor
FGGlobals::FGGlobals() :
+ renderer( new FGRenderer ),
subsystem_mgr( new SGSubsystemMgr ),
event_mgr( new SGEventMgr ),
sim_time_sec( 0.0 ),
delete props;
delete commands;
delete io;
-
- // make sure only to delete the initial waypoints list if it acually
- // still exists.
- if (initial_waypoints)
- delete initial_waypoints;
+ delete renderer;
+ delete initial_waypoints;
}
for (unsigned i = 0; i < path_list.size(); i++) {
- ulDir *d = ulOpenDir( path_list[0].c_str() );
+ ulDir *d = ulOpenDir( path_list[i].c_str() );
if (d == NULL)
continue;
ulCloseDir( d );
}
+FGRenderer *
+FGGlobals::get_renderer () const
+{
+ return renderer;
+}
+
SGSubsystemMgr *
FGGlobals::get_subsystem_mgr () const
{