Expose a MarkDirtyResource that takes GLResource for convenience

This commit is contained in:
baldurk
2014-11-11 22:43:55 +00:00
parent 1f33368624
commit c0fb5fa8ac
3 changed files with 15 additions and 8 deletions
+7
View File
@@ -118,6 +118,13 @@ class GLResourceManager : public ResourceManager<GLResource, GLResourceRecord>
return ResourceManager::GetResourceRecord(GetID(res));
}
using ResourceManager::MarkDirtyResource;
void MarkDirtyResource(GLResource res)
{
return ResourceManager::MarkDirtyResource(GetID(res));
}
void RegisterSync(void *ctx, GLsync sync, GLuint &name, ResourceId &id)
{
name = (GLuint)Atomic::Inc64(&m_SyncName);
@@ -1551,7 +1551,7 @@ void WrappedOpenGL::glClearTexImage(GLuint texture, GLint level, GLenum format,
}
else if(m_State == WRITING_IDLE)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
}
@@ -1646,6 +1646,6 @@ void WrappedOpenGL::glClearTexSubImage(GLuint texture, GLint level, GLint xoffse
}
else if(m_State == WRITING_IDLE)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
}
@@ -2200,7 +2200,7 @@ void WrappedOpenGL::glTextureSubImage1DEXT(GLuint texture, GLenum target, GLint
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{
@@ -2312,7 +2312,7 @@ void WrappedOpenGL::glTextureSubImage2DEXT(GLuint texture, GLenum target, GLint
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{
@@ -2426,7 +2426,7 @@ void WrappedOpenGL::glTextureSubImage3DEXT(GLuint texture, GLenum target, GLint
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{
@@ -2525,7 +2525,7 @@ void WrappedOpenGL::glCompressedTextureSubImage1DEXT(GLuint texture, GLenum targ
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{
@@ -2626,7 +2626,7 @@ void WrappedOpenGL::glCompressedTextureSubImage2DEXT(GLuint texture, GLenum targ
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{
@@ -2729,7 +2729,7 @@ void WrappedOpenGL::glCompressedTextureSubImage3DEXT(GLuint texture, GLenum targ
{
if(m_State == WRITING_IDLE && unpackbuf != 0)
{
GetResourceManager()->MarkDirtyResource(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)));
GetResourceManager()->MarkDirtyResource(TextureRes(GetCtx(), texture));
}
else
{