From 679db5a22b9cd53b81c546b904a67d9290a70180 Mon Sep 17 00:00:00 2001 From: frohlich Date: Sat, 14 Mar 2009 11:08:43 +0000 Subject: [PATCH] The chunked stuff is no longer needed for the ground tiles. ... I (Mathias Froehlich), believe that it is more performant (for the GPU) to build the biggest indexed sets possible at the expense of tight culling. I (Mathias Froehlich) also know that the CPU is more performant on smaller chunks building the old flat groundcache on such tiles. :) So this code *was* to balance these two contrary requirements to some degree. Now we have optimized datastructures for drawing and differently optimized datastructures for intersection tests. Modified Files: simgear/scene/tgdb/obj.cxx --- simgear/scene/tgdb/obj.cxx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index d5964815..ebcb3167 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -368,32 +368,11 @@ struct SGTileGeometryBin { osg::Geode* geode = new osg::Geode; SGMaterialTriangleMap::const_iterator i; for (i = materialTriangleMap.begin(); i != materialTriangleMap.end(); ++i) { - // CHUNCKED (sic) here splits up unconnected triangles parts of - // the mesh into different Geometry sets, presumably for better - // culling. I (timoore) believe it is more performant to build - // the biggest indexed sets possible at the expense of tight - // culling. -//#define CHUNCKED -#ifdef CHUNCKED - SGMaterial *mat = matlib->find(i->first); - - std::list connectSets; - i->second.getConnectedSets(connectSets); - - std::list::iterator j; - for (j = connectSets.begin(); j != connectSets.end(); ++j) { - osg::Geometry* geometry = i->second.buildGeometry(*j); - if (mat) - geometry->setStateSet(mat->get_state()); - geode->addDrawable(geometry); - } -#else osg::Geometry* geometry = i->second.buildGeometry(); SGMaterial *mat = matlib->find(i->first); if (mat) geometry->setStateSet(mat->get_state()); geode->addDrawable(geometry); -#endif } return geode; } -- 2.39.5