H. Verbeet : wined3d:
Flip the coordinate system rather than the coordinates itself for
onscreen surfaces in stretch_rect_fbo .
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 4 07:11:12 CDT 2007
Module: wine
Branch: master
Commit: d9b7369255b4964efb89cbe83cd39b9d2fef2f7f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9b7369255b4964efb89cbe83cd39b9d2fef2f7f
Author: H. Verbeet <hverbeet at gmail.com>
Date: Thu May 3 20:57:09 2007 +0200
wined3d: Flip the coordinate system rather than the coordinates itself for onscreen surfaces in stretch_rect_fbo.
---
dlls/wined3d/device.c | 10 ++++++----
dlls/wined3d/wined3d_private.h | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5c2d700..2ad92da 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d6e5e22..80f1751 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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
More information about the wine-cvs
mailing list