[PATCH 1/1] d3dx9: Complete test for D3DXCreateSphere. (try 4)

Misha Koshelev misha680 at gmail.com
Sun Jul 25 18:20:19 CDT 2010


Dear All:

I talked to Henri on IRC today about try 3:
http://www.winehq.org/pipermail/wine-patches/2010-July/091176.html

He mentioned he would like to see indices and vertices calculated together.

I thought I could not initially, but I have now done this. The freeglut code was quite helpful.

Additionally, I am now using lookup tables for sine and cosine.

(I could potentially simplify by multiplying the normal by the radius, but even freeglut does not make
that calculation for speed).

I kept some macros in, although I know you guys don't like that too much.

Like sphere_vertex. I think it makes the code clearer.

Also I have created a mesh structure since we are generating both together.

I apologize for the resend but I think this is actually a much better patch, and, at this point, I am not sure what
better way there is to generate a sphere's indices and vertices.

Thank you
Misha

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d3dx9-Complete-test-for-D3DXCreateSphere.txt
Type: text/x-patch
Size: 17792 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100725/57743f1a/attachment.bin>


More information about the wine-patches mailing list