mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
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
This commit is contained in:
parent
51fc817e8b
commit
9fe66bdc5e
@ -207,11 +207,8 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId)
|
|||||||
GLint previous;
|
GLint previous;
|
||||||
GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &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
|
// 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(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, myWidth, myHeight));
|
||||||
|
|
||||||
GLCheck(glBindTexture(GL_TEXTURE_2D, previous));
|
GLCheck(glBindTexture(GL_TEXTURE_2D, previous));
|
||||||
|
@ -198,10 +198,8 @@ void RenderImageImplPBuffer::UpdateTexture(unsigned int textureId)
|
|||||||
GLint previous;
|
GLint previous;
|
||||||
GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous));
|
GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous));
|
||||||
|
|
||||||
// Bind the texture
|
|
||||||
GLCheck(glBindTexture(GL_TEXTURE_2D, textureId));
|
|
||||||
|
|
||||||
// Copy the rendered pixels to the image
|
// 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(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, myWidth, myHeight));
|
||||||
|
|
||||||
GLCheck(glBindTexture(GL_TEXTURE_2D, previous));
|
GLCheck(glBindTexture(GL_TEXTURE_2D, previous));
|
||||||
|
Loading…
Reference in New Issue
Block a user