scenery: Make static scenery static.

This commit is contained in:
Mathias Froehlich 2013-02-25 06:55:35 +01:00
parent 4a31045fd9
commit d90abdcb44
3 changed files with 6 additions and 2 deletions

View 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);

View 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);

View 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);