GL_TRIANGLE or GL_TRIANGLE_STRIP?

When loading model, is the model rendered with triangles using GL_TRIANGLES or GL_TRIANGLE_STRIP or something else?

umm, that depends on whether you call glBegin(GL_TRIANGLES) or glBegin(GL_TRIANGLE_STRIP ). what do you mean by “loading model”? are you using some higher level library, or are you asking what you should use? there is no glLoadModel function call…

if you are asking what you should use, triangle strips are better, because a) there are fewer function calls, b) they can use vertex sharing (probably implementation dependent) and c) probably some other things that i cant think of at the moment…

I mean when loading model from 3DS, ASE… and when creating own 3D model.
Which is better or more common?

well, like i said, triangle strips are better, but triangles are easier (but i dont know if they are more common). some 3d files may store things as triangle strips, but i dont know which ones, if any do that.

if the file format doesnt store things as triangles strips (most likely), you will have to calculate which triangles go into strips. there are several algorithms to do this, as well as some libraries that are already written…

from what I remember, 3ds, dxf and vrml stores vertex in any order, then polygons (“maillage” in french). So, this is Triangle for openGL.

Originally posted by Spiral Man:
[b]well, like i said, triangle strips are better, but triangles are easier (but i dont know if they are more common). some 3d files may store things as triangle strips, but i dont know which ones, if any do that.

if the file format doesnt store things as triangles strips (most likely), you will have to calculate which triangles go into strips. there are several algorithms to do this, as well as some libraries that are already written…[/b]

What! Need to calculate, then using GL_TRIANGLES is lot easier. But what you mean by GL_TRIANGLE_STRIP is better?

when you actually end up drawing the triangles, they draw faster, and you get better frame rates, if you use triangle strips. the optimal thing to do would be to load the triangles in from the file, calculate the triangle strips from those, and then use the triangle strips when you draw the object (you should probably also get rid of the original triangles as well, so they dont waste memory…)

yes, it is a pain, but if you have models with high polygon counts, and you use a good striping algorithm (creates longer strips, that contain more triangles) then you can signifigantly increase the rendering speed.

Thanks.