Moved setting of TexturePoolSize into State.
This commit is contained in:
parent
d56499025b
commit
0c0f96ac3d
@ -11,6 +11,7 @@
|
|||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
#include <osg/State>
|
#include <osg/State>
|
||||||
|
#include <osg/Texture>
|
||||||
#include <osg/Notify>
|
#include <osg/Notify>
|
||||||
#include <osg/GLU>
|
#include <osg/GLU>
|
||||||
#include <osg/GLExtensions>
|
#include <osg/GLExtensions>
|
||||||
@ -227,6 +228,7 @@ void State::setInitialViewMatrix(const osg::RefMatrix* matrix)
|
|||||||
void State::setMaxTexturePoolSize(unsigned int size)
|
void State::setMaxTexturePoolSize(unsigned int size)
|
||||||
{
|
{
|
||||||
_maxTexturePoolSize = size;
|
_maxTexturePoolSize = size;
|
||||||
|
osg::Texture::getTextureObjectManager(getContextID())->setMaxTexturePoolSize(size);
|
||||||
osg::notify(osg::NOTICE)<<"_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
|
osg::notify(osg::NOTICE)<<"_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,13 +846,6 @@ bool SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
|
|||||||
osg::ref_ptr<RefMatrix> proj = new osg::RefMatrix(projection);
|
osg::ref_ptr<RefMatrix> proj = new osg::RefMatrix(projection);
|
||||||
osg::ref_ptr<RefMatrix> mv = new osg::RefMatrix(modelview);
|
osg::ref_ptr<RefMatrix> 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.
|
// collect any occluder in the view frustum.
|
||||||
if (_camera->containsOccluderNodes())
|
if (_camera->containsOccluderNodes())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user