Preliminary work on support for a texture object pool that is designed to help manage resources down the GPU more tightly.

This commit is contained in:
Robert Osfield
2009-09-22 18:45:24 +00:00
parent 26925be4f4
commit 3d75054e2c
21 changed files with 1616 additions and 566 deletions

View File

@@ -834,7 +834,8 @@ void SceneView::cull()
}
}
}
bool SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage, osg::Viewport *viewport)
@@ -845,6 +846,12 @@ bool SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
osg::ref_ptr<RefMatrix> proj = new osg::RefMatrix(projection);
osg::ref_ptr<RefMatrix> mv = new osg::RefMatrix(modelview);
osg::State* state = _renderInfo.getState();
if (state->getMaxTexturePoolSize()!=0)
{
osg::Texture::getTextureObjectManager(state->getContextID())->setTexturePoolSize(state->getMaxTexturePoolSize());
}
// collect any occluder in the view frustum.
if (_camera->containsOccluderNodes())