G'day
For some crazy reason, c++ isn't liking the shorthand shorthand syntax for array initalisation when my array is an array of structs right.
This works fine:
int myArray[4];
myArray[] = {0,1,2,3}
But this doesnt:
CustomVertextFormat vertices[4];
vertices[] =
{
{ 0.0f, 0.0f, 0.0f, 1.0f, D3DCOLOR_XRGB( 255, 255, 255), 0.0f, 0.0f, }, // top left
{ width, 0.0f, 0.0f, 1.0f, D3DCOLOR_XRGB( 255, 255, 255), 1.0f, 0.0f, }, // top right
{ 0.0f, height, 0.0f, 1.0f, D3DCOLOR_XRGB( 255, 255, 255), 0.0f, 1.0f, }, // bottom left
{ width, height, 0.0f, 1.0f, D3DCOLOR_XRGB( 255, 255, 255), 1.0f, 1.0f, }, // bottom right
}
I could go vertices[0].x = 0.0f;
vertices[0].y = 0.0f
...etc but I'ld prefer to do it the quick and easy way =P
I'm guessing its something stupidly simple, any ideas ?