wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable().
This commit is contained in:
parent
0738505173
commit
f5fbfe47d7
|
@ -4238,18 +4238,25 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
|
||||||
glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
checkGLcall("glTexParameteri");
|
checkGLcall("glTexParameteri");
|
||||||
|
|
||||||
|
if (device->render_offscreen)
|
||||||
|
{
|
||||||
|
LONG tmp = rect.top;
|
||||||
|
rect.top = rect.bottom;
|
||||||
|
rect.bottom = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord3fv(&coords[0].x);
|
glTexCoord3fv(&coords[0].x);
|
||||||
glVertex2i(rect.left, device->render_offscreen ? rect.bottom : rect.top);
|
glVertex2i(rect.left, rect.top);
|
||||||
|
|
||||||
glTexCoord3fv(&coords[1].x);
|
glTexCoord3fv(&coords[1].x);
|
||||||
glVertex2i(rect.left, device->render_offscreen ? rect.top : rect.bottom);
|
glVertex2i(rect.left, rect.bottom);
|
||||||
|
|
||||||
glTexCoord3fv(&coords[2].x);
|
glTexCoord3fv(&coords[2].x);
|
||||||
glVertex2i(rect.right, device->render_offscreen ? rect.top : rect.bottom);
|
glVertex2i(rect.right, rect.bottom);
|
||||||
|
|
||||||
glTexCoord3fv(&coords[3].x);
|
glTexCoord3fv(&coords[3].x);
|
||||||
glVertex2i(rect.right, device->render_offscreen ? rect.bottom : rect.top);
|
glVertex2i(rect.right, rect.top);
|
||||||
glEnd();
|
glEnd();
|
||||||
checkGLcall("glEnd");
|
checkGLcall("glEnd");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue