From 373f3931e9455599c430c0eff0ad0e5c1ecb6063 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 26 Jan 2011 18:47:55 +0000 Subject: [PATCH] Implement first pass at texture compile estimation --- include/osgUtil/GraphicsCostEstimator | 3 +-- src/osgUtil/GraphicsCostEstimator.cpp | 21 ++++++++++++++----- src/osgUtil/IncrementalCompileOperation.cpp | 23 ++++++++++++++++++--- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/include/osgUtil/GraphicsCostEstimator b/include/osgUtil/GraphicsCostEstimator index edd1d6ad3..d25df4c28 100644 --- a/include/osgUtil/GraphicsCostEstimator +++ b/include/osgUtil/GraphicsCostEstimator @@ -39,7 +39,6 @@ struct ClampedLinearCostFunction1D double operator() (unsigned int input) const { - OSG_NOTICE<<"ClampedLinearCostFunction1D::operator("<estimateCompileCost(geometry); } CostPair estimateDrawCost(const osg::Geometry* geometry) const { return _geometryEstimator->estimateDrawCost(geometry); } - CostPair estimateCompileCost(const osg::Texture* texture) const { return _textureEstimator->estimateDrawCost(texture); } + CostPair estimateCompileCost(const osg::Texture* texture) const { return _textureEstimator->estimateCompileCost(texture); } CostPair estimateDrawCost(const osg::Texture* texture) const { return _textureEstimator->estimateDrawCost(texture); } CostPair estimateCompileCost(const osg::Program* program) const { return _programEstimator->estimateCompileCost(program); } diff --git a/src/osgUtil/GraphicsCostEstimator.cpp b/src/osgUtil/GraphicsCostEstimator.cpp index 235a6ad87..b26f83423 100644 --- a/src/osgUtil/GraphicsCostEstimator.cpp +++ b/src/osgUtil/GraphicsCostEstimator.cpp @@ -46,7 +46,7 @@ void GeometryCostEstimator::calibrate(osg::RenderInfo& renderInfo) CostPair GeometryCostEstimator::estimateCompileCost(const osg::Geometry* geometry) const { - OSG_NOTICE<<"GeometryCostEstimator::estimateCompileCost(..)"<getUseVertexBufferObjects() && geometry->areFastPathsUsed(); bool usesDL = !usesVBO && geometry->getUseDisplayList() && geometry->getSupportsDisplayList(); @@ -79,7 +79,7 @@ CostPair GeometryCostEstimator::estimateCompileCost(const osg::Geometry* geometr cost.first = _displayListCompileConstant + _displayListCompileFactor * cost.first ; } - OSG_NOTICE<<" cost.first="<