From: Mathias Froehlich Date: Mon, 25 Feb 2013 05:55:35 +0000 (+0100) Subject: scenery: Make static scenery static. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d90abdcb44d8b0835f02d9111e18cfbe20e992c3;p=simgear.git scenery: Make static scenery static. --- diff --git a/simgear/scene/tgdb/SGOceanTile.cxx b/simgear/scene/tgdb/SGOceanTile.cxx index 3679b57c..c5efc625 100644 --- a/simgear/scene/tgdb/SGOceanTile.cxx +++ b/simgear/scene/tgdb/SGOceanTile.cxx @@ -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); diff --git a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx index edb9cb20..3ab6153c 100644 --- a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx +++ b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx @@ -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); diff --git a/simgear/scene/tgdb/pt_lights.cxx b/simgear/scene/tgdb/pt_lights.cxx index dc0c599a..eb8dd048 100644 --- a/simgear/scene/tgdb/pt_lights.cxx +++ b/simgear/scene/tgdb/pt_lights.cxx @@ -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);