diff --git a/src/SFML/Graphics/Linux/RenderImageImplPBuffer.cpp b/src/SFML/Graphics/Linux/RenderImageImplPBuffer.cpp index b945e70df..8d255bd6f 100644 --- a/src/SFML/Graphics/Linux/RenderImageImplPBuffer.cpp +++ b/src/SFML/Graphics/Linux/RenderImageImplPBuffer.cpp @@ -207,11 +207,8 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId) GLint previous; GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous)); - // Bind the texture - GLCheck(glEnable(GL_TEXTURE_2D)); - GLCheck(glBindTexture(GL_TEXTURE_2D, textureId)); - // Copy the rendered pixels to the image + GLCheck(glBindTexture(GL_TEXTURE_2D, textureId)); GLCheck(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, myWidth, myHeight)); GLCheck(glBindTexture(GL_TEXTURE_2D, previous)); diff --git a/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp b/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp index f1f595178..5ef3ffc99 100644 --- a/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp +++ b/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp @@ -198,10 +198,8 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId) GLint previous; GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous)); - // Bind the texture - GLCheck(glBindTexture(GL_TEXTURE_2D, textureId)); - // Copy the rendered pixels to the image + GLCheck(glBindTexture(GL_TEXTURE_2D, textureId)); GLCheck(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, myWidth, myHeight)); GLCheck(glBindTexture(GL_TEXTURE_2D, previous));