#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/sg_path.hxx>
-#include <simgear/sky/clouds3d/SkySceneLoader.hpp>
-#include <simgear/sky/clouds3d/SkyUtil.hpp>
+#ifdef FG_USE_CLOUDS_3D
+# include <simgear/sky/clouds3d/SkySceneLoader.hpp>
+# include <simgear/sky/clouds3d/SkyUtil.hpp>
+#endif
#include <simgear/timing/sg_time.hxx>
#include <simgear/timing/lowleveltime.h>
extern const char *default_root;
-SkySceneLoader *sgCloud3d;
+#ifdef FG_USE_CLOUDS_3D
+ SkySceneLoader *sgCloud3d;
+#endif
// Scan the command line options for the specified option and return
globals->get_environment_mgr()->bind();
#endif
+#ifdef FG_USE_CLOUDS_3D
////////////////////////////////////////////////////////////////////
// Initialize the 3D cloud subsystem.
////////////////////////////////////////////////////////////////////
}
SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d Loaded: ");
}
+#endif
////////////////////////////////////////////////////////////////////
// Initialize vor/ndb/ils/fix list management and query systems
#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
-#include <simgear/sky/clouds3d/SkySceneLoader.hpp>
-#include <simgear/sky/clouds3d/SkyUtil.hpp>
+#ifdef FG_USE_CLOUDS_3D
+# include <simgear/sky/clouds3d/SkySceneLoader.hpp>
+# include <simgear/sky/clouds3d/SkyUtil.hpp>
+#endif
#include <simgear/sky/sky.hxx>
#include <simgear/timing/sg_time.hxx>
// Sky structures
SGSky *thesky;
-SkySceneLoader *sgClouds3d;
-bool _bcloud_orig = true;
+
+#ifdef FG_USE_CLOUDS_3D
+ SkySceneLoader *sgClouds3d;
+ bool _bcloud_orig = true;
+#endif
// hack
sgMat4 copy_of_ssgOpenGLAxisSwapMatrix =
glEnable(GL_BLEND);
glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ) ;
- /*
- glEnable( GL_TEXTURE_2D );
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- */
-
+#ifdef FG_USE_CLOUDS_3D
if ( _bcloud_orig ) {
Point3D c = globals->get_scenery()->get_center();
sgClouds3d->Set_Cloud_Orig( &c );
_bcloud_orig = false;
}
sgClouds3d->Update( current__view->get_absolute_view_pos() );
+#endif
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glDisable(GL_DEPTH_TEST);
}
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
*/
+#ifdef FG_USE_CLOUDS_3D
sgClouds3d->Draw((sgVec4 *)current__view->get_VIEW());
+#endif
glEnable( GL_FOG );
glEnable( GL_LIGHTING );
glEnable( GL_DEPTH_TEST );
viewmgr->get_current_view()->get_v_fov() );
fgHUDReshape();
+
+#ifdef FG_USE_CLOUDS_3D
sgClouds3d->Resize( viewmgr->get_current_view()->get_h_fov(),
viewmgr->get_current_view()->get_v_fov() );
+#endif
+
}
// Initialize GLUT and define a main window
fgSetBool("/environment/clouds/status", false);
} else if ( arg == "--enable-clouds" ) {
fgSetBool("/environment/clouds/status", true);
+#ifdef FG_USE_CLOUDS_3D
} else if ( arg == "--disable-clouds3d" ) {
fgSetBool("/sim/rendering/clouds3d", false);
} else if ( arg == "--enable-clouds3d" ) {
fgSetBool("/sim/rendering/clouds3d", true);
+#endif
} else if ( arg.find( "--fov=" ) == 0 ) {
parse_fov( arg.substr(6) );
} else if ( arg == "--disable-fullscreen" ) {