Skip to content

Commit

Permalink
Don't call TextureBinding where enum might be GL_NONE. Refs #156
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Sep 24, 2015
1 parent f3abf31 commit b5f73cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4346,7 +4346,7 @@ void WrappedOpenGL::Common_glTextureBufferRangeEXT(ResourceId texId, GLenum targ
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);
RDCASSERT(record);

if(record->datatype == TextureBinding(target) && m_Textures[texId].internalFormat == internalformat && m_State == WRITING_IDLE)
if(record->datatype == eGL_TEXTURE_BINDING_BUFFER && m_Textures[texId].internalFormat == internalformat && m_State == WRITING_IDLE)
{
GetResourceManager()->MarkDirtyResource(texId);
GetResourceManager()->MarkDirtyResource(BufferRes(GetCtx(), buffer));
Expand Down Expand Up @@ -4455,7 +4455,7 @@ void WrappedOpenGL::Common_glTextureBufferEXT(ResourceId texId, GLenum target, G
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);
RDCASSERT(record);

if(record->datatype == TextureBinding(target) && m_Textures[texId].internalFormat == internalformat && m_State == WRITING_IDLE)
if(record->datatype == eGL_TEXTURE_BINDING_BUFFER && m_Textures[texId].internalFormat == internalformat && m_State == WRITING_IDLE)
{
GetResourceManager()->MarkDirtyResource(texId);
GetResourceManager()->MarkDirtyResource(BufferRes(GetCtx(), buffer));
Expand Down

0 comments on commit b5f73cb

Please sign in to comment.