wined3d: Add zero/near zero vertex rhw special case.

This commit is contained in:
Alexander Dorofeyev 2007-12-25 00:18:21 -08:00 committed by Alexandre Julliard
parent d5a09fdda7
commit 1e23602d4b
1 changed files with 7 additions and 2 deletions

View File

@ -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) {