Alexander Dorofeyev : wined3d: Add zero/near zero vertex rhw special case.
Alexandre Julliard
julliard at winehq.org
Wed Dec 26 10:05:09 CST 2007
Module: wine
Branch: master
Commit: 1e23602d4bc93ebf609c2a6d99654e2bf3996786
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1e23602d4bc93ebf609c2a6d99654e2bf3996786
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Tue Dec 25 00:18:21 2007 -0800
wined3d: Add zero/near zero vertex rhw special case.
---
dlls/wined3d/directx.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 9e6bf33..9536b71 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2906,9 +2906,14 @@ static void position_d3dcolor(void *data) {
}
static void position_float4(void *data) {
GLfloat *pos = (float *) data;
- float w = 1.0 / pos[3];
- glVertex4f(pos[0] * w, pos[1] * w, pos[2] * w, w);
+ if (pos[3] < eps && pos[3] > -eps)
+ glVertex3fv(pos);
+ else {
+ float w = 1.0 / pos[3];
+
+ glVertex4f(pos[0] * w, pos[1] * w, pos[2] * w, w);
+ }
}
static void diffuse_d3dcolor(void *data) {
More information about the wine-cvs
mailing list