wined3d: Remove restoring the read buffer from read_from_framebuffer_texture().

The few functions that care about the read buffer should explicitly set it
themselves, instead of assuming any particular state.
This commit is contained in:
Henri Verbeet 2010-07-19 18:36:22 +02:00 committed by Alexandre Julliard
parent d6e08f8074
commit 4b850ed121

View file

@ -1493,7 +1493,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
IWineD3DDeviceImpl *device = This->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
GLint prevRead;
if (!surface_is_offscreen(This))
{
@ -1518,7 +1517,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
ENTER_GL();
glGetIntegerv(GL_READ_BUFFER, &prevRead);
glReadBuffer(device->offscreenBuffer);
checkGLcall("glReadBuffer");
@ -1526,9 +1524,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
0, 0, 0, 0, This->currentDesc.Width, This->currentDesc.Height);
checkGLcall("glCopyTexSubImage2D");
glReadBuffer(prevRead);
checkGLcall("glReadBuffer");
LEAVE_GL();
context_release(context);