]> git.mxchange.org Git - flightgear.git/commitdiff
#ifdef out all references to sgCloud3d until more of it's issues can be
authorcurt <curt>
Tue, 10 Dec 2002 19:25:12 +0000 (19:25 +0000)
committercurt <curt>
Tue, 10 Dec 2002 19:25:12 +0000 (19:25 +0000)
addressed.

src/Main/Makefile.am
src/Main/fg_init.cxx
src/Main/main.cxx
src/Main/options.cxx

index a96bcbf8c07495d5b8614e396842f34269ae261f..fb8060b0063727e68f44854c58376ab5d46f996a 100644 (file)
@@ -73,7 +73,7 @@ fgfs_LDADD = \
        $(top_builddir)/src/Systems/libSystems.a \
        $(top_builddir)/src/Time/libTime.a \
        $(WEATHER_LIBS) \
-       -lsgroute -lsgsky -lsgclouds3d -lsgephem -lsgtiming -lsgio -lsgscreen \
+       -lsgroute -lsgsky -lsgephem -lsgtiming -lsgio -lsgscreen \
        -lsgmath -lsgbucket -lsgdebug -lsgmagvar -lsgmisc -lsgxml \
        -lsgserial \
        $(THREAD_LIBS) \
index 790811dc41d0598259524bbdc9378b1614001a6a..33029768ad1139c0d596d16e39b1aa97942970df 100644 (file)
 #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>
 
@@ -139,7 +141,9 @@ SG_USING_STD(string);
 
 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
@@ -1405,6 +1409,7 @@ bool fgInitSubsystems() {
     globals->get_environment_mgr()->bind();
 #endif
 
+#ifdef FG_USE_CLOUDS_3D
     ////////////////////////////////////////////////////////////////////
     // Initialize the 3D cloud subsystem.
     ////////////////////////////////////////////////////////////////////
@@ -1421,6 +1426,7 @@ bool fgInitSubsystems() {
         }
         SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d Loaded: ");
     }
+#endif
 
     ////////////////////////////////////////////////////////////////////
     // Initialize vor/ndb/ils/fix list management and query systems
index abb47fe1cb1f182aa0cede20e23123a8f4ee5ab7..704e2e1ce0425eab8829d147e8406fe3a5ed751d 100644 (file)
@@ -80,8 +80,10 @@ SG_USING_STD(endl);
 #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>
 
@@ -231,8 +233,11 @@ ssgTransform *fgd_pos = NULL;
 
 // 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 =
@@ -513,20 +518,14 @@ void fgRenderFrame() {
             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);
         }
@@ -826,7 +825,9 @@ void fgRenderFrame() {
             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 );
@@ -1377,8 +1378,12 @@ void fgReshape( int width, int height ) {
               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
index 51d52c6a1cf5b92323d4a022c51223718e5aa2c7..832410e1d5fb149521f1502694ccb16c036e7c04 100644 (file)
@@ -801,10 +801,12 @@ parse_option (const string& arg)
         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" ) {