Opengl function to convert trianglelist to trianglestrip

Started by
2 comments, last by V-man 14 years, 1 month ago
HI, i would like to know if exists an opengl function to convert trianglelists into triangletrips Thank´s
Advertisement
There doesn't. But you can download nvidia's nvtristrip lib.
[size="1"]
Quote:Original post by jor1980
HI, i would like to know if exists an opengl function to convert trianglelists into triangletrips
Unless you are targeting very ancient hardware, triangle strips are unlikely to represent a performance gain.

The sweet spot for all modern hardware is 'indexed triangle lists' (plenty of info on google, etc.). The primary benefit is that indexed lists can allow the hardware vertex cache to function very efficiently.

The NvTriStrip library mentioned by mrbastard also works well to optimise indexed triangle lists [smile]

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

GL_TRIANGLE_LIST is bullshit.
What you need is index reordering algorithm for GL_TRIANGLES.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement