X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2FSGOceanTile.cxx;h=9ff60f3e0c8729b84371968b5bef7ef0af3655fe;hb=c3b1802e956db11c2b06d354d90bca3ca9622a7b;hp=0fcb16f8084037519c71b4ddde810680c1dc4300;hpb=0e35168bdb991afbc5390257949e928956a27249;p=simgear.git diff --git a/simgear/scene/tgdb/SGOceanTile.cxx b/simgear/scene/tgdb/SGOceanTile.cxx index 0fcb16f8..9ff60f3e 100644 --- a/simgear/scene/tgdb/SGOceanTile.cxx +++ b/simgear/scene/tgdb/SGOceanTile.cxx @@ -37,8 +37,11 @@ #include #include #include +#include +#include #include #include + #include using namespace simgear; @@ -254,7 +257,7 @@ void fillDrawElementsWithApron(short height, short width, osg::Node* SGOceanTile(const SGBucket& b, SGMaterialLib *matlib) { - osg::StateSet *stateSet = 0; + Effect *effect = 0; double tex_width = 1000.0; @@ -266,7 +269,7 @@ osg::Node* SGOceanTile(const SGBucket& b, SGMaterialLib *matlib) tex_width = mat->get_xsize(); // set OSG State - stateSet = mat->get_state(); + effect = mat->get_effect(); } else { SG_LOG( SG_TERRAIN, SG_ALERT, "Ack! unknown use material name = Ocean"); } @@ -302,10 +305,10 @@ osg::Node* SGOceanTile(const SGBucket& b, SGMaterialLib *matlib) + 2 * (latPoints - 1))); fillDrawElementsWithApron(latPoints, lonPoints, drawElements->begin()); geometry->addPrimitiveSet(drawElements); - geometry->setStateSet(stateSet); - osg::Geode* geode = new osg::Geode; + EffectGeode* geode = new EffectGeode; geode->setName("Ocean tile"); + geode->setEffect(effect); geode->addDrawable(geometry); osg::MatrixTransform* transform = new osg::MatrixTransform;