]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/cloud.hxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / sky / cloud.hxx
index 75356450efdc39fb14063396ab278284f8c2017f..95f6dbbedbd879b8c9c19b75ebf5e4610455a71b 100644 (file)
@@ -184,10 +184,20 @@ public:
      */
     inline void setAlpha( float alpha ) {
         if ( alpha < 0.0 ) { alpha = 0.0; }
-        if ( alpha > 1.0 ) { alpha = 1.0; }
+        if ( alpha > max_alpha ) { alpha = max_alpha; }
         cloud_alpha = alpha;
     }
 
+    inline void setMaxAlpha( float alpha ) {
+        if ( alpha < 0.0 ) { alpha = 0.0; }
+        if ( alpha > 1.0 ) { alpha = 1.0; }
+        max_alpha = alpha;
+    }
+
+    inline float getMaxAlpha() const {
+        return max_alpha;
+    }
+
     /** build the cloud object */
     void rebuild();
 
@@ -217,8 +227,6 @@ public:
 
     osg::Switch* getNode() { return cloud_root.get(); }
 
-    static bool enable_bump_mapping;
-
     /** return the 3D layer cloud associated with this 2D layer */
     SGCloudField *get_layer3D(void) { return layer3D; }
 
@@ -257,6 +265,7 @@ private:
     // double xoff, yoff;
     SGGeod last_pos;
     double last_course;
+    double max_alpha;
 
     osg::Vec2 base;