Fix texture coordinate calculation in surface_blt_to_drawable

Pablo Spallanzani pspallanz at gmail.com
Sat Jan 12 11:57:08 CST 2008


This fixes a bug with the use of opengl to render direct draw in older
graphic cards.

The problem is in dlls/wined3d/surface.c in surface_blt_to_drawable.

3547          coords[0].x = rect.left   / This->pow2Width;

3550          coords[1].x = rect.left   / This->pow2Width;

3553          coords[2].x = rect.right  / This->pow2Width;

3556          coords[3].x = rect.right  / This->pow2Width;

3559          coords[0].y = rect.top    / This->pow2Height;
3560          coords[1].y = rect.bottom / This->pow2Height;
3561          coords[2].y = rect.bottom / This->pow2Height;
3562          coords[3].y = rect.top    / This->pow2Height;


All calculation are done with integers so when rect.right < pow2Wdith and
rect.bottom < pow2Height
all texture coordinates are set to 0 thus only the upper left pixel of the
image is displayed
scaled up to cover the entire window.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20080112/b7e5512b/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surface.c.patch
Type: text/x-diff
Size: 2508 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080112/b7e5512b/attachment.patch 


More information about the wine-patches mailing list