Fix texture coordinate calculation in surface_blt_to_drawable
thunderbird2k at gmx.net
Mon Jan 14 11:23:27 CST 2008
I just wanted to confirm that this patch is correct. Stefan and I talked about it and it should be right. Before the surface rewrite there were two codepaths like this and one of them used integers and the other texture one used floats. During the rewrite they were merged and the combined one used integers. That's what caused the regression. The use of floats makes much more sense.
> 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.x = rect.left / This->pow2Width;
> 3550 coords.x = rect.left / This->pow2Width;
> 3553 coords.x = rect.right / This->pow2Width;
> 3556 coords.x = rect.right / This->pow2Width;
> 3559 coords.y = rect.top / This->pow2Height;
> 3560 coords.y = rect.bottom / This->pow2Height;
> 3561 coords.y = rect.bottom / This->pow2Height;
> 3562 coords.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.
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
More information about the wine-devel