RRRRRR!!! Arays
While working with Vertex buffers i found this code from DirectX SDK (i modified for my needs)
D3DVERTEXELEMENT9 vertex0PosTex1Tex[] =
{
{0, 0,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_POSITIONT, 0},
{0,12,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD, 0},
{1, 0,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD, 1},
D3DDECL_END()
};
This cannot compile and this is the errors compiler gives me:
error C2059: syntax error : '{'
error C2334: unexpected token(s) preceding '{'; skipping apparent function body
I have problems before too with seting up array when declaring it but i forgot how i solved it. Also code completly copied from SDK generates more errors
(end of bracket not found ,etc,etcetc)
How to set this array :<
HELP ME PLEASE!!!
I don't think that the posted array is the problem. I copied the same exact array and compiled it in a junk project and it worked fine. Maby I'm just misunderstood you question?
EDIT: I compiled it in Microsofts visual C++ 2003
EDIT: I compiled it in Microsofts visual C++ 2003
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement