From 88ce98b47dd57de5cf9f446759ed7c21077587be Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 3 Feb 2011 12:22:09 +0000 Subject: [PATCH] Moved GraphicsCostEstimator from osgUtil into core OSG library --- examples/osggraphicscost/osggraphicscost.cpp | 12 ++++---- .../{osgUtil => osg}/GraphicsCostEstimator | 28 +++++++++++-------- include/osgUtil/IncrementalCompileOperation | 10 ++++--- src/osg/CMakeLists.txt | 2 ++ .../GraphicsCostEstimator.cpp | 9 ++++-- src/osgUtil/CMakeLists.txt | 2 -- src/osgUtil/IncrementalCompileOperation.cpp | 9 +++--- 7 files changed, 42 insertions(+), 30 deletions(-) rename include/{osgUtil => osg}/GraphicsCostEstimator (89%) rename src/{osgUtil => osg}/GraphicsCostEstimator.cpp (98%) diff --git a/examples/osggraphicscost/osggraphicscost.cpp b/examples/osggraphicscost/osggraphicscost.cpp index 0e778783d..2b8b37945 100644 --- a/examples/osggraphicscost/osggraphicscost.cpp +++ b/examples/osggraphicscost/osggraphicscost.cpp @@ -22,13 +22,13 @@ #include -#include +#include class CalibrateCostEsimator : public osg::GraphicsOperation { public: - CalibrateCostEsimator(osgUtil::GraphicsCostEstimator* gce): + CalibrateCostEsimator(osg::GraphicsCostEstimator* gce): osg::GraphicsOperation("CalbirateCostEstimator",false), _gce(gce) {} @@ -38,7 +38,7 @@ public: _gce->calibrate(renderInfo); } - osg::ref_ptr _gce; + osg::ref_ptr _gce; }; @@ -54,14 +54,14 @@ int main(int argc, char** argv) osg::ref_ptr node = osgDB::readNodeFiles(arguments); if (!node) return 0; - osg::ref_ptr gce = new osgUtil::GraphicsCostEstimator; + osg::ref_ptr gce = new osg::GraphicsCostEstimator; viewer.setSceneData(node.get()); viewer.realize(); - osgUtil::CostPair compileCost = gce->estimateCompileCost(node.get()); - osgUtil::CostPair drawCost = gce->estimateDrawCost(node.get()); + osg::CostPair compileCost = gce->estimateCompileCost(node.get()); + osg::CostPair drawCost = gce->estimateDrawCost(node.get()); OSG_NOTICE<<"estimateCompileCost("<getName()<<"), CPU="<getName()<<"), CPU="<