I added this code right at the end, and got it wrong.
Only used by the WGL_ARB_render_texture code.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
_mesa_GetIntegerv(GL_READ_BUFFER, &readBufSave);
/* Read from the winsys buffer */
- _mesa_BindFramebuffer(GL_READ_BUFFER, 0);
+ _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, 0);
_mesa_ReadBuffer(srcBuffer);
/* copy image from pbuffer to texture */
/* restore readbuffer */
_mesa_ReadBuffer(readBufSave);
- _mesa_BindFramebuffer(GL_READ_BUFFER, readFBOSave);
+ _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, readFBOSave);
}