Kek
06-14-2002, 04:46 AM
Hello,
When Applying textures in the scene, the performances decrease awfully! I tried to do Tringle strip instead of triangles (as I read in this forum) but my code is made from a 3ds script (which I made and so I can change). This script returns an array for the faces containing the indices of the vertices in another array (also returned). so my display function is something like that:
glBegin(GL_TRIANGLES);
for(i=0;i<nb_faces;i++)
{
for(j=0;j<3;j++)
{
glTexCoord2f(tab_tv[tab_f[i][j]]);
glVertex3fv(tab_v[tab_f[i][j]);
}
}
glEnd();
So I had to make an orderd vector containing the indices of the vertex to be displayed thanks to GL_TRIANGLE_STRIP ... but It's very hard finding the order and I have many bugs...
I wonder if there isn't another way to reorder the indices (Must I change my script... and how?) or maybe is there a totally different way to do?
Kek
PS: I'm not very good in english and I may have made few mistakes (I think incices is the plurar of index?)
When Applying textures in the scene, the performances decrease awfully! I tried to do Tringle strip instead of triangles (as I read in this forum) but my code is made from a 3ds script (which I made and so I can change). This script returns an array for the faces containing the indices of the vertices in another array (also returned). so my display function is something like that:
glBegin(GL_TRIANGLES);
for(i=0;i<nb_faces;i++)
{
for(j=0;j<3;j++)
{
glTexCoord2f(tab_tv[tab_f[i][j]]);
glVertex3fv(tab_v[tab_f[i][j]);
}
}
glEnd();
So I had to make an orderd vector containing the indices of the vertex to be displayed thanks to GL_TRIANGLE_STRIP ... but It's very hard finding the order and I have many bugs...
I wonder if there isn't another way to reorder the indices (Must I change my script... and how?) or maybe is there a totally different way to do?
Kek
PS: I'm not very good in english and I may have made few mistakes (I think incices is the plurar of index?)