]> git.mxchange.org Git - simgear.git/commitdiff
scenery: Make static scenery static.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Mon, 25 Feb 2013 05:55:35 +0000 (06:55 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Mon, 25 Feb 2013 05:55:35 +0000 (06:55 +0100)
simgear/scene/tgdb/SGOceanTile.cxx
simgear/scene/tgdb/SGTexturedTriangleBin.hxx
simgear/scene/tgdb/pt_lights.cxx

index 3679b57cad07c887d956145a7a52e02bc4ef425c..c5efc62579730f0e8b63de231d19f479b75fda08 100644 (file)
@@ -311,6 +311,7 @@ osg::Node* SGOceanTile(const SGBucket& b, SGMaterialLib *matlib, int latPoints,
     cl->push_back(osg::Vec4(1, 1, 1, 1));
   
     osg::Geometry* geometry = new osg::Geometry;
+    geometry->setDataVariance(osg::Object::STATIC);
     geometry->setVertexArray(grid.vl);
     geometry->setNormalArray(grid.nl);
     geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
index edb9cb20e7b8fd251ed7558119994dfba43abc0c..3ab6153c891cb282bfafb918c143c7e15eb63acf 100644 (file)
@@ -330,6 +330,7 @@ public:
     colors->push_back(osg::Vec4(1, 1, 1, 1));
 
     osg::Geometry* geometry = new osg::Geometry;
+    geometry->setDataVariance(osg::Object::STATIC);
     geometry->setVertexArray(vertices);
     geometry->setNormalArray(normals);
     geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
index dc0c599a304cb8c47e0adf29742dc5a13f2c6c6e..eb8dd048f5bb904d1396e36b3d5294bf69ca4cd5 100644 (file)
@@ -254,6 +254,7 @@ SGLightFactory::getLightDrawable(const SGLightBin::Light& light)
   colors->push_back(toOsg(light.color));
   
   osg::Geometry* geometry = new osg::Geometry;
+  geometry->setDataVariance(osg::Object::STATIC);
   geometry->setVertexArray(vertices);
   geometry->setNormalBinding(osg::Geometry::BIND_OFF);
   geometry->setColorArray(colors);
@@ -291,6 +292,7 @@ SGLightFactory::getLightDrawable(const SGDirectionalLightBin::Light& light)
   colors->push_back(toOsg(invisibleColor));
   
   osg::Geometry* geometry = new osg::Geometry;
+  geometry->setDataVariance(osg::Object::STATIC);
   geometry->setVertexArray(vertices);
   geometry->setNormalBinding(osg::Geometry::BIND_OFF);
   geometry->setColorArray(colors);
@@ -327,7 +329,7 @@ SGLightFactory::getLights(const SGLightBin& lights, unsigned inc, float alphaOff
   }
   
   osg::Geometry* geometry = new osg::Geometry;
-  
+  geometry->setDataVariance(osg::Object::STATIC);
   geometry->setVertexArray(vertices);
   geometry->setNormalBinding(osg::Geometry::BIND_OFF);
   geometry->setColorArray(colors);
@@ -380,7 +382,7 @@ SGLightFactory::getLights(const SGDirectionalLightBin& lights)
   }
   
   osg::Geometry* geometry = new osg::Geometry;
-  
+  geometry->setDataVariance(osg::Object::STATIC);
   geometry->setVertexArray(vertices);
   geometry->setNormalBinding(osg::Geometry::BIND_OFF);
   geometry->setColorArray(colors);