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

@@ -150,7 +150,7 @@ void Texture1D::apply(State& state) const
{
// we don't have a applyTexImage1D_subload yet so can't reuse.. so just generate a new texture object.
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(contextID,GL_TEXTURE_1D);
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(this, contextID, GL_TEXTURE_1D);
textureObject->bind();
@@ -171,7 +171,7 @@ void Texture1D::apply(State& state) const
{
// we don't have a applyTexImage1D_subload yet so can't reuse.. so just generate a new texture object.
textureObject = generateTextureObject(contextID,GL_TEXTURE_1D);
textureObject = generateTextureObject(this, contextID,GL_TEXTURE_1D);
textureObject->bind();
@@ -196,7 +196,7 @@ void Texture1D::apply(State& state) const
else if ( (_textureWidth!=0) && (_internalFormat!=0) )
{
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(
contextID,GL_TEXTURE_1D,_numMipmapLevels,_internalFormat,_textureWidth,1,1,0);
this,contextID,GL_TEXTURE_1D,_numMipmapLevels,_internalFormat,_textureWidth,1,1,0);
textureObject->bind();
@@ -378,7 +378,7 @@ void Texture1D::copyTexImage1D(State& state, int x, int y, int width)
_min_filter = LINEAR;
_mag_filter = LINEAR;
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(contextID,GL_TEXTURE_1D);
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(this, contextID,GL_TEXTURE_1D);
textureObject->bind();