d3dx9_36: Implement D3DXCreateBox

Joris Huizer joris_huizer at yahoo.com
Sun Mar 27 11:08:11 CDT 2011


Hello,

In this patch, one part seemed strange to me:
You are declaring vertices as static memory:

+    static FLOAT vertices[144]

But you are changing the values during the function:

+
+    for(i = 0; i<  24; i++)
+    {
+        vertices[6 * i    ] *= width;
+        vertices[6 * i + 1] *= height;
+        vertices[6 * i + 2] *= depth;
+    }
+

Given that original values are never restored, I think you can not mark the array as static,
otherwise incorrect values are used after the first call.

The other arrays are not adapted, so they are fine as static memory (And you may in fact mark those static const)

HTH,
Joris




More information about the wine-devel mailing list