On Tue, Jul 27, 2010 at 1:30 AM, Misha Koshelev <misha680 at gmail.com> wrote:
I have spent quite a bit of time with Henri on IRC re this patch (thank you so much) and it now has his blessing.
Hopefully everyone else's as well :)
Looks nice, but I have a question.
When you're going to actually implement D3DXCreateSphere (probably applies to subsequent mesh functions too), aren't you going to need big chunks of this code, like the compute_sphere and *_sincos_table functions?
Or are you going to use a different approach to compute the meshes in the actual implementation?
Octavian
Yes it is going to be fairly similar. A few exceptions:
* No mesh structure per se (vertex and index buffer inline in the actual function) * Definitely the sincos_table parts
You can see (a rather dated at this point) version here: http://github.com/misha680/wine/blob/master/dlls/d3dx9_36/mesh.c
Why do you ask?
Are you aware of a good way to share code between tests and the actual function?
Thank you Misha
p.s. I'm not really aware of another (better) approach to compute.
On Tue, Jul 27, 2010 at 4:15 AM, Misha Koshelev misha680@gmail.com wrote:
Why do you ask?
Are you aware of a good way to share code between tests and the actual function?
That's why I was asking, as I suppose you can't use functions from the test in the implementation, nor have internal functions used in the tests. Only way I see it is to have something like mesh_utils.[ch] which is linked with both the dll and the test, but I'm not sure if that's acceptable. Maybe someone else can answer that.
A little observation is that you don't really need to precompute both tables, just the one for phi (if you compute sin and cos of current theta outside the inner loop).
Octavian
Sorry mobile gmail for android does not allow bottom post. Maybe someone can suggest better way to reply.
Code sharing between tests and dll: I honestly dont know of a good way but I would be very surprised if something like linking the same fil
On Jul 26, 2010 8:40 PM, "Octavian Voicu" octavian.voicu@gmail.com wrote:
On Tue, Jul 27, 2010 at 4:15 AM, Misha Koshelev misha680@gmail.com wrote:
Why do you ask?
Ar...
That's why I was asking, as I suppose you can't use functions from the test in the implementation, nor have internal functions used in the tests. Only way I see it is to have something like mesh_utils.[ch] which is linked with both the dll and the test, but I'm not sure if that's acceptable. Maybe someone else can answer that.
A little observation is that you don't really need to precompute both tables, just the one for phi (if you compute sin and cos of current theta outside the inner loop).
Octavian