On 31 October 2010 22:53, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
> + static const struct
> + {
> + float x, y, z;
> + float u, v;
> + }
> + quad[] =
> + {
> + {-1.0, -1.0, 0.1, 0.0, 0.0},
> + {-1.0, 1.0, 0.1, 1.0, 0.0},
> + { 1.0, -1.0, 0.1, 0.0, 1.0},
> + { 1.0, 1.0, 0.1, 1.0, 1.0}
> + };
Not that I care all that much, but notice that those literals are
actually doubles.
> + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float) * 5);
Now that you're using a proper structure for "quad", "sizeof(float) *
5" is really just the same as "sizeof(*quad)".