[PATCH 03/10] d3dx9: Test raw vertex data for D3DXCreateSphere. (try 2)

Henri Verbeet hverbeet at gmail.com
Mon Jul 19 06:08:59 CDT 2010


On 17 July 2010 21:13, Misha Koshelev <misha680 at gmail.com> wrote:
> +#include <assert.h>
You don't use that in this patch.

> +    D3DXVECTOR3 test_vertex_data[8];
I think it makes sense to use the same kind of structure you're using
in your implementation of D3DXCreateSphere() here.

> +            if (vertex_data)
> +            {
> +                test_vertex_data[0].x = 0.0f; test_vertex_data[0].y = 0.0f; test_vertex_data[0].z = 1.0f;
> +                test_vertex_data[1].x = 0.0f; test_vertex_data[1].y = 0.0f; test_vertex_data[1].z = 1.0f;
> +                test_vertex_data[2].x = 0.0f; test_vertex_data[2].y = 1.0f; test_vertex_data[2].z = -4.37114e-008f;
> +                test_vertex_data[3].x = 0.0f; test_vertex_data[3].y = 1.0f; test_vertex_data[3].z = -4.37114e-008f;
> +                test_vertex_data[4].x = -8.74228e-008f; test_vertex_data[4].y = -1.0f; test_vertex_data[4].z = -4.37114e-008f;
> +                test_vertex_data[5].x = -8.74228e-008f; test_vertex_data[5].y = -1.0f; test_vertex_data[5].z = -4.37114e-008f;
> +                test_vertex_data[6].x = 0.0f; test_vertex_data[6].y = 0.0f; test_vertex_data[6].z = -1.0f;
> +                test_vertex_data[7].x = 0.0f; test_vertex_data[7].y = 0.0f; test_vertex_data[7].z = -1.0f;
> +
Note that you can simply initialize test_vertex_data with these
values. On the other hand, you could also just calculate the expected
values.



More information about the wine-devel mailing list