FumarMata
Joined: 08 May 2007 Posts: 1
|
Posted: Tue May 08, 2007 8:29 pm Post subject: GU_TRIANGLE_STRIP |
|
|
Hello everybody
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: | 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;
} |
then I assign those values to "cinta", the struct which holds all the vertices:
| Code: | 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];
} |
and then, I draw the triangle strip on the screen:
| Code: | sceGumDrawArray( GU_TRIANGLE_STRIP, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 100, 0, cinta );
|
Do you see something wrong there?
Thanks
Marc
ps. sorry if you saw this question in another forum, but I got no answers and I could not solve it |
|