mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
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:
parent
d07ffa8389
commit
51fc817e8b
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user