From 0c0f96ac3da39e691807584fc159361238f2a314 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 Sep 2009 14:54:13 +0000 Subject: [PATCH] Moved setting of TexturePoolSize into State. --- src/osg/State.cpp | 2 ++ src/osgUtil/SceneView.cpp | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index f98eab98e..bb24ec646 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -11,6 +11,7 @@ * OpenSceneGraph Public License for more details. */ #include +#include #include #include #include @@ -227,6 +228,7 @@ void State::setInitialViewMatrix(const osg::RefMatrix* matrix) void State::setMaxTexturePoolSize(unsigned int size) { _maxTexturePoolSize = size; + osg::Texture::getTextureObjectManager(getContextID())->setMaxTexturePoolSize(size); osg::notify(osg::NOTICE)<<"_maxTexturePoolSize="<<_maxTexturePoolSize< proj = new osg::RefMatrix(projection); osg::ref_ptr mv = new osg::RefMatrix(modelview); - osg::State* state = _renderInfo.getState(); - if (state->getMaxTexturePoolSize()!=0) - { - osg::Texture::getTextureObjectManager(state->getContextID())->setMaxTexturePoolSize(state->getMaxTexturePoolSize()); - } - - // collect any occluder in the view frustum. if (_camera->containsOccluderNodes()) {