Dylan Smith : d3dx9/tests: Fix a normal comparison for triangles with zero area.

Alexandre Julliard julliard at winehq.org
Fri May 20 12:44:30 CDT 2011


Module: wine
Branch: master
Commit: 147e1200495bd947775f6873d420a46d218caa59
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=147e1200495bd947775f6873d420a46d218caa59

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu May 19 18:35:02 2011 -0400

d3dx9/tests: Fix a normal comparison for triangles with zero area.

---

 dlls/d3dx9_36/tests/mesh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 5367745..c8853cd 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -2785,7 +2785,7 @@ static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, str
             D3DXVec3Subtract(&v2, vtx3, vtx2);
             D3DXVec3Cross(&normal, &v1, &v2);
             D3DXVec3Normalize(&normal, &normal);
-            ok(compare_vec3(normal, forward),
+            ok(!D3DXVec3Length(&normal) || compare_vec3(normal, forward),
                "Test %s, glyph %d, face %d normal, result (%g, %g, %g), expected (%g, %g, %g)\n", name, i, face_idx1,
                normal.x, normal.y, normal.z, forward.x, forward.y, forward.z);
         }




More information about the wine-cvs mailing list