From 51fc817e8bff836e6b1d1c7fed7c8c23c39be7ff Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Tue, 2 Feb 2010 08:47:24 +0000 Subject: [PATCH] Fixed a texture cache problem in the P-Buffer implementation of sf::RenderImage git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1388 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/RenderImage.cpp | 4 ++-- src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SFML/Graphics/RenderImage.cpp b/src/SFML/Graphics/RenderImage.cpp index 3b91155d4..030185ff1 100644 --- a/src/SFML/Graphics/RenderImage.cpp +++ b/src/SFML/Graphics/RenderImage.cpp @@ -76,12 +76,12 @@ bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuff // Create the implementation delete myRenderImage; - /*if (priv::RenderImageImplFBO::IsSupported()) + if (priv::RenderImageImplFBO::IsSupported()) { // Use FBO myRenderImage = new priv::RenderImageImplFBO; } - else*/ if (priv::RenderImageImplPBuffer::IsSupported()) + else if (priv::RenderImageImplPBuffer::IsSupported()) { // Use P-Buffer myRenderImage = new priv::RenderImageImplPBuffer; diff --git a/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp b/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp index 90f6b0554..f1f595178 100644 --- a/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp +++ b/src/SFML/Graphics/Win32/RenderImageImplPBuffer.cpp @@ -199,7 +199,6 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId) 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