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:
@@ -190,7 +190,7 @@ void TextureRectangle::apply(State& state) const
|
||||
else if (_subloadCallback.valid())
|
||||
{
|
||||
// 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_RECTANGLE);
|
||||
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(this, contextID,GL_TEXTURE_RECTANGLE);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
@@ -212,7 +212,7 @@ void TextureRectangle::apply(State& state) const
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_mutex);
|
||||
|
||||
// we don't have a applyTexImage1D_subload yet so can't reuse.. so just generate a new texture object.
|
||||
textureObject = generateTextureObject(contextID,GL_TEXTURE_RECTANGLE);
|
||||
textureObject = generateTextureObject(this, contextID,GL_TEXTURE_RECTANGLE);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
@@ -235,7 +235,7 @@ void TextureRectangle::apply(State& state) const
|
||||
else if ( (_textureWidth!=0) && (_textureHeight!=0) && (_internalFormat!=0) )
|
||||
{
|
||||
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(
|
||||
contextID,GL_TEXTURE_RECTANGLE,0,_internalFormat,_textureWidth,_textureHeight,1,0);
|
||||
this, contextID,GL_TEXTURE_RECTANGLE,0,_internalFormat,_textureWidth,_textureHeight,1,0);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
@@ -460,8 +460,7 @@ void TextureRectangle::copyTexImage2D(State& state, int x, int y, int width, int
|
||||
|
||||
// switch off mip-mapping.
|
||||
//
|
||||
_textureObjectBuffer[contextID] = textureObject =
|
||||
generateTextureObject(contextID,GL_TEXTURE_RECTANGLE);
|
||||
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(this, contextID,GL_TEXTURE_RECTANGLE);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user