I am pretty new to 3d Programming and was wondering if somebody here could help me on the following question:
in the pspgu.h at the sceGuDrawArray I need to give a pointer to a vertex list.
I am playing around with the cube sample where it says:
Code: Select all
struct Vertex
{
float u, v;
unsigned int color;
float x,y,z;
};
struct Vertex __attribute__((aligned(16))) vertices[12*3] =
{
{0, 0, 0xff7f0000,-1,-1, 1}, // 0
{1, 0, 0xff7f0000,-1, 1, 1}, // 4
{1, 1, 0xff7f0000, 1, 1, 1}, // 5....
* Vertex order:
* [for vertices(1-8)]
* [texture uv]
* [weights (0-8)]
* [color]
* [normal]
* [vertex]
* [/for]
obviously, on the vertex structure the author defined:
float u, v;
unsigned int color;
float x,y,z;
Can i simply put EVERYTHING i need in this structure (like normals etc.???) it is my understanding that I need to follow the above order but how is it that the 3 last x,y,z are not mistaken for normals but correctly taken as vertex coords??
I am also trying different formats and came across a few exporter for 3ds max.. However they seem to export the coords and then a seperate set of POLYGONS (basically a list of what points need to be connected with which points from the coords of an object.. in the Cube Sample they are listed in the correct order for drawing but if I want to use an existing exporter or take a COLLADA File, how to I use the vertex coords AND the Polygon Information to render it on PSP??
I am not sure if this makes sense but it's rather hard to explain :)
Any help or hint would be greatly appreciated!