wined3d: Translate drawable coordinates in flush_to_framebuffer_drawpixels().

This commit is contained in:
Henri Verbeet 2010-11-02 12:02:49 +01:00 committed by Alexandre Julliard
parent 3f0d16c5bf
commit 8e059205ba
1 changed files with 5 additions and 0 deletions

View File

@ -1765,12 +1765,17 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
GLenum buffer = surface_get_gl_buffer(This); GLenum buffer = surface_get_gl_buffer(This);
TRACE("Unlocking %#x buffer.\n", buffer); TRACE("Unlocking %#x buffer.\n", buffer);
context_set_draw_buffer(context, buffer); context_set_draw_buffer(context, buffer);
surface_translate_drawable_coords(This, context->win_handle, &rect);
glPixelZoom(1.0f, -1.0f);
} }
else else
{ {
/* Primary offscreen render target */ /* Primary offscreen render target */
TRACE("Offscreen render target.\n"); TRACE("Offscreen render target.\n");
context_set_draw_buffer(context, device->offscreenBuffer); context_set_draw_buffer(context, device->offscreenBuffer);
glPixelZoom(1.0f, 1.0f);
} }
glRasterPos3i(rect.left, rect.top, 1); glRasterPos3i(rect.left, rect.top, 1);