wined3d: Flip the coordinate system rather than the coordinates itself for onscreen surfaces in stretch_rect_fbo.

This commit is contained in:
H. Verbeet 2007-05-03 20:57:09 +02:00 committed by Alexandre Julliard
parent 8299714952
commit d9b7369255
2 changed files with 8 additions and 6 deletions

View File

@ -5485,8 +5485,8 @@ void apply_fbo_state(IWineD3DDevice *iface) {
check_fbo_status(iface);
}
void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const WINED3DRECT *src_rect,
IWineD3DSurface *dst_surface, const WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip) {
void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect,
IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
GLbitfield mask = GL_COLOR_BUFFER_BIT; /* TODO: Support blitting depth/stencil surfaces */
IWineD3DSwapChain *src_swapchain, *dst_swapchain;
@ -5525,7 +5525,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
glReadBuffer(buffer);
checkGLcall("glReadBuffer()");
flip = !flip;
src_rect->y1 = ((IWineD3DSurfaceImpl *)src_surface)->currentDesc.Height - src_rect->y1;
src_rect->y2 = ((IWineD3DSurfaceImpl *)src_surface)->currentDesc.Height - src_rect->y2;
} else {
TRACE("Source surface %p is offscreen\n", src_surface);
bind_fbo(iface, GL_READ_FRAMEBUFFER_EXT, &This->src_fbo);
@ -5546,7 +5547,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const
glDrawBuffer(buffer);
checkGLcall("glDrawBuffer()");
flip = !flip;
dst_rect->y1 = ((IWineD3DSurfaceImpl *)dst_surface)->currentDesc.Height - dst_rect->y1;
dst_rect->y2 = ((IWineD3DSurfaceImpl *)dst_surface)->currentDesc.Height - dst_rect->y2;
} else {
TRACE("Destination surface %p is offscreen\n", dst_surface);
bind_fbo(iface, GL_DRAW_FRAMEBUFFER_EXT, &This->dst_fbo);

View File

@ -1998,7 +1998,7 @@ static inline BOOL use_ps(IWineD3DDeviceImpl *device) {
&& ((IWineD3DPixelShaderImpl *)device->stateBlock->pixelShader)->baseShader.function);
}
void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, const WINED3DRECT *src_rect,
IWineD3DSurface *dst_surface, const WINED3DRECT *dst_rect, WINED3DTEXTUREFILTERTYPE filter, BOOL flip);
void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect,
IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, WINED3DTEXTUREFILTERTYPE filter, BOOL flip);
#endif