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
This commit is contained in:
LaurentGom 2010-02-02 08:47:24 +00:00
parent d07ffa8389
commit 51fc817e8b
2 changed files with 2 additions and 3 deletions

View File

@ -76,12 +76,12 @@ bool RenderImage::Create(unsigned int width, unsigned int height, bool depthBuff
// Create the implementation // Create the implementation
delete myRenderImage; delete myRenderImage;
/*if (priv::RenderImageImplFBO::IsSupported()) if (priv::RenderImageImplFBO::IsSupported())
{ {
// Use FBO // Use FBO
myRenderImage = new priv::RenderImageImplFBO; myRenderImage = new priv::RenderImageImplFBO;
} }
else*/ if (priv::RenderImageImplPBuffer::IsSupported()) else if (priv::RenderImageImplPBuffer::IsSupported())
{ {
// Use P-Buffer // Use P-Buffer
myRenderImage = new priv::RenderImageImplPBuffer; myRenderImage = new priv::RenderImageImplPBuffer;

View File

@ -199,7 +199,6 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId)
GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous)); GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous));
// Bind the texture // Bind the texture
GLCheck(glEnable(GL_TEXTURE_2D));
GLCheck(glBindTexture(GL_TEXTURE_2D, textureId)); GLCheck(glBindTexture(GL_TEXTURE_2D, textureId));
// Copy the rendered pixels to the image // Copy the rendered pixels to the image