diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index ffbbc06618..71e438ccca 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -519,17 +519,8 @@ void GSDeviceOGL::ClearDepth(GSTexture* t, float c) // It can't be used here because it will clear both depth and stencil if (0 && GLLoader::found_GL_ARB_clear_texture) { #ifndef ENABLE_GLES - static_cast(t)->EnableUnit(); - // Yes a very nice API to mix float and integer - struct clear { - float depth; - GLuint stencil; - } clear; - - clear.depth = c; - clear.stencil = 0; - - gl_ClearTexImage(static_cast(t)->GetID(), 0, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, &clear); + ASSERT(c == 0.0f); + gl_ClearTexImage(static_cast(t)->GetID(), GL_TEX_LEVEL_0, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, NULL); #endif } else { OMSetFBO(m_fbo); @@ -553,7 +544,8 @@ void GSDeviceOGL::ClearStencil(GSTexture* t, uint8 c) // It can't be used here because it will clear both depth and stencil if (0 && GLLoader::found_GL_ARB_clear_texture) { #ifndef ENABLE_GLES - gl_ClearTexImage(static_cast(t)->GetID(), GL_TEX_LEVEL_0, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, &c); + ASSERT(c == 0); + gl_ClearTexImage(static_cast(t)->GetID(), GL_TEX_LEVEL_0, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, NULL); #endif } else { OMSetFBO(m_fbo); diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 974eecbeaf..cd5a7558e0 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -322,7 +322,6 @@ GSTextureOGL::~GSTextureOGL() void GSTextureOGL::Clear(const void *data) { #ifndef ENABLE_GLES - EnableUnit(); gl_ClearTexImage(m_texture_id, 0, m_int_format, m_int_type, data); #endif }