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

@@ -86,6 +86,10 @@ State::State():
_glMaxTextureCoords = 1;
_glMaxTextureUnits = 1;
_maxTexturePoolSize = 0;
_maxVBOPoolSize = 0;
_maxFBOPoolSize = 0;
}
State::~State()
@@ -220,6 +224,24 @@ void State::setInitialViewMatrix(const osg::RefMatrix* matrix)
_initialInverseViewMatrix.invert(*_initialViewMatrix);
}
void State::setMaxTexturePoolSize(unsigned int size)
{
_maxTexturePoolSize = size;
osg::notify(osg::NOTICE)<<"_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
}
void State::setMaxVBOPoolSize(unsigned int size)
{
_maxVBOPoolSize = size;
osg::notify(osg::NOTICE)<<"_maxVBOPoolSize="<<_maxVBOPoolSize<<std::endl;
}
void State::setMaxFBOPoolSize(unsigned int size)
{
_maxFBOPoolSize = size;
osg::notify(osg::NOTICE)<<"_maxFBOPoolSize="<<_maxFBOPoolSize<<std::endl;
}
void State::pushStateSet(const StateSet* dstate)
{