Added status collection to full range of texture classes
This commit is contained in:
@@ -124,6 +124,10 @@ void Texture1D::apply(State& state) const
|
||||
// current OpenGL context.
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
Texture::TextureObjectManager* tom = Texture::getTextureObjectManager(contextID);
|
||||
ElapsedTime elapsedTime(&(tom->getApplyTime()));
|
||||
tom->getNumberApplied()++;
|
||||
|
||||
// get the texture object for the current contextID.
|
||||
TextureObject* textureObject = getTextureObject(contextID);
|
||||
|
||||
|
||||
@@ -208,6 +208,11 @@ void Texture2DArray::apply(State& state) const
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
Texture::TextureObjectManager* tom = Texture::getTextureObjectManager(contextID);
|
||||
ElapsedTime elapsedTime(&(tom->getApplyTime()));
|
||||
tom->getNumberApplied()++;
|
||||
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
// if not supported, then return
|
||||
|
||||
@@ -195,7 +195,11 @@ void Texture3D::apply(State& state) const
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
|
||||
Texture::TextureObjectManager* tom = Texture::getTextureObjectManager(contextID);
|
||||
ElapsedTime elapsedTime(&(tom->getApplyTime()));
|
||||
tom->getNumberApplied()++;
|
||||
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
if (!extensions->isTexture3DSupported())
|
||||
|
||||
@@ -196,6 +196,11 @@ void TextureCubeMap::apply(State& state) const
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
// current OpenGL context.
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
Texture::TextureObjectManager* tom = Texture::getTextureObjectManager(contextID);
|
||||
ElapsedTime elapsedTime(&(tom->getApplyTime()));
|
||||
tom->getNumberApplied()++;
|
||||
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
if (!extensions->isCubeMapSupported())
|
||||
|
||||
@@ -161,8 +161,10 @@ void TextureRectangle::apply(State& state) const
|
||||
// current OpenGL context.
|
||||
const unsigned int contextID = state.getContextID();
|
||||
|
||||
Texture::TextureObjectManager* tom = Texture::getTextureObjectManager(contextID);
|
||||
ElapsedTime elapsedTime(&(tom->getApplyTime()));
|
||||
tom->getNumberApplied()++;
|
||||
|
||||
static OpenThreads::Mutex s_mutex;
|
||||
|
||||
// get the texture object for the current contextID.
|
||||
TextureObject* textureObject = getTextureObject(contextID);
|
||||
@@ -209,9 +211,7 @@ void TextureRectangle::apply(State& state) const
|
||||
else if (_image.valid() && _image->data())
|
||||
{
|
||||
|
||||
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.
|
||||
// we don't have a applyTexImage1D_subload yet so can't reuse.. so just generate a new texture object.
|
||||
textureObject = generateTextureObject(this, contextID,GL_TEXTURE_RECTANGLE);
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
Reference in New Issue
Block a user