I'm trying to build a simple triangle strip like this:
(a simple triangle strip) made of 100 vertices and bended in one axis. The problem is that on the screen, it's never just a strip. Lots of triangles go to what seems the 0,0,0 point
First I set up an array of vertices (that I will use for other calculations later)
Code: Select all
float fifi = 0.0f;
float fk=0.0f;
for(int i=0;i<100;i++){
puntsCinta[i][0]=i%2;
puntsCinta[i][1]=fk;
puntsCinta[i][2]=cos(fifi);
fifi+=.1f;
fk+=.5f;
}
Code: Select all
for(int i=0;i<100;i++){
cinta[i].color=0xffffffff;
cinta[i].x=puntsCinta[i][0];
cinta[i].y=puntsCinta[i][1];
cinta[i].z=puntsCinta[i][2];
}
Code: Select all
sceGumDrawArray( GU_TRIANGLE_STRIP, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 100, 0, cinta );
Thanks
Marc
ps. sorry if you saw this question in another forum, but I got no answers and I could not solve it