Can someone just test out my verticies/indicies and see if you get problems, I can render fine in my DX app with this, but on the psp I see weird triangle issues.
Here is the code im using for the cube sample, I replaced the vertices with these and created an index buffer, but its not working, any ideas??
struct Vertex vertices[20] =
{
{-15.201900,0.000000,-17.577198},
{15.201900,0.000000,-17.577198},
{-15.201900,0.000000,17.577198},
{15.201900,0.000000,17.577198},
{-15.201900,22.327791,-17.577198},
{15.201900,22.327791,-17.577198},
{-15.201900,22.327791,17.577198},
{15.201900,22.327791,17.577198},
{-15.201900,0.000000,-17.577198},
{15.201900,22.327791,-17.577198},
{15.201900,0.000000,-17.577198},
{-15.201900,22.327791,-17.577198},
{15.201900,0.000000,17.577198},
{15.201900,22.327791,-17.577198},
{15.201900,0.000000,17.577198},
{-15.201900,22.327791,17.577198},
{-15.201900,0.000000,17.577198},
{15.201900,22.327791,17.577198},
{-15.201900,0.000000,17.577198},
{-15.201900,22.327791,-17.577198}
};
int indicies[36] =
{
0,3,2,
3,0,1,
4,7,5,
7,4,6,
8,9,10,
9,8,11,
1,7,12,
7,1,13,
14,15,16,
15,14,17,
18,19,0,
19,18,6
};
sceGuDrawArray(GU_TRIANGLES,GU_VERTEX_32BITF|GU_TRANSFORM_3D,12*3,indicies,vertices);
I basically get a bunch of triangles all over the screen, looks like somethings wrong, but can't tell what. Any clues??
Thanks a lot
Jeff.
Cube Issue
You're passing a index-table to the GE, but you're making multiple mistakes while doing so.
a) the PSP does not support 32-bit indices. Change the index-list into unsigned short.
b) you do not set the vertex-format properly. For this data it should be: GU_VERTEX_32BITF|GU_INDEX_16BIT|GU_TRANSFORM_3D
Start with that and see if you're getting any closer.
a) the PSP does not support 32-bit indices. Change the index-list into unsigned short.
b) you do not set the vertex-format properly. For this data it should be: GU_VERTEX_32BITF|GU_INDEX_16BIT|GU_TRANSFORM_3D
Start with that and see if you're getting any closer.
GE Dominator