From 8398f45d43e095ddcee454e295a205e455184b4a Mon Sep 17 00:00:00 2001 From: timoore Date: Sun, 30 Sep 2007 19:51:49 +0000 Subject: [PATCH] ocean state set in osg::Geometry Put the ocean tile state set in osg::Geometry, not the osg::Geode, so that is readily available during intersection testing and can be used to find the corresponding SGMaterial. Problem reported by grtux (gh.robin@laposte.net) --- simgear/scene/tgdb/SGOceanTile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/scene/tgdb/SGOceanTile.cxx b/simgear/scene/tgdb/SGOceanTile.cxx index af1dddf4..59083b90 100644 --- a/simgear/scene/tgdb/SGOceanTile.cxx +++ b/simgear/scene/tgdb/SGOceanTile.cxx @@ -298,11 +298,11 @@ 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; geode->setName("Ocean tile"); geode->addDrawable(geometry); - geode->setStateSet(stateSet); osg::MatrixTransform* transform = new osg::MatrixTransform; transform->setName("Ocean"); -- 2.39.5