From 5bec60a602aefc3ed665d4629dbf7788f1daa021 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 5 Jun 2002 17:44:39 +0000 Subject: [PATCH] Set up cloud layers when thesky is allocated, to ensure that they are created only once. --- src/Main/main.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index fc94b74d1..68c1237b4 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1548,7 +1548,16 @@ int mainLoop( int argc, char **argv ) { 0.0 ); globals->set_ephem( ephem ); + // TODO: move to environment mgr thesky = new SGSky; + SGPath texture_path(globals->get_fg_root()); + texture_path.append("Textures"); + texture_path.append("Sky"); + for (int i = 0; i < FGEnvironmentMgr::MAX_CLOUD_LAYERS; i++) { + SGCloudLayer * layer = new SGCloudLayer(texture_path.str()); + thesky->add_cloud_layer(layer); + } + SGPath sky_tex_path( globals->get_fg_root() ); sky_tex_path.append( "Textures" ); -- 2.39.5