From 9fe66bdc5eb5b4de421e1ffe76e57f75c42be6f1 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Tue, 2 Feb 2010 08:48:35 +0000 Subject: [PATCH] Forget to fix the Linux implementation in previous commit :) git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1389 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/Linux/RenderImageImplPBuffer.cpp | 5 +---- src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) 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));