]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/CloudShaderGeometry.hxx
Added some OSG headers for the correct evaluation of the OSG_VERSION_LESS_THAN macro.
[simgear.git] / simgear / scene / sky / CloudShaderGeometry.hxx
index 1b63f805f98043a344865482e3c1b5290dce393a..b8e44fa06b1254da1e8421a457482cd5437c4eff 100644 (file)
@@ -32,6 +32,7 @@
 #include <osg/Vec3>
 #include <osg/Vec4>
 #include <osg/buffered_value>
+#include <osg/Version>
 
 #include <simgear/math/SGMath.hxx>
 #include <simgear/math/sg_random.h>
@@ -46,7 +47,7 @@ class CloudShaderGeometry : public osg::Drawable
         
         const static unsigned int USR_ATTR_1 = 10;
         const static unsigned int USR_ATTR_2 = 11;
-        const static unsigned int USR_ATTR_3 = 12;
+        const static unsigned int USR_ATTR_3 = 12;        
                 
         CloudShaderGeometry()
         { 
@@ -95,17 +96,20 @@ class CloudShaderGeometry : public osg::Drawable
         { return _cloudsprites[i]; }
         
         virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
-        virtual osg::BoundingBox computeBound() const
+        virtual osg::BoundingBox
+#if OSG_VERSION_LESS_THAN(3,3,2)
+        computeBound()
+#else
+        computeBoundingBox()
+#endif
+        const
         {
             return _bbox;
         }
         
-        void setGeometry(osg::Drawable* geometry)
-        {
-            _geometry = geometry;
-        }
-        
         void addSprite(const SGVec3f& p, int tx, int ty, float w, float h, float cull);
+        void generateGeometry();
+        void rebuildGeometry();
                 
         osg::ref_ptr<osg::Drawable> _geometry;