Optimal rendering method for triangles:

I am adding a pseudo 2D interface to my engine, using glOrtho and by rendering simple triangles to make quads facing the screen. My question is this: Since there are only6 vertices (cant I make them 4 by using triangle strip?) should I use vertex arrays or glVertex3*?

Immediate mode won’t hurt performance at all here, depending on how many triangles you are drawing (just 2 for a single quad?).

Yes, 2 triangles for a quad, of course. In D3D, there was D3DPT_TRIANGLESTRIP flag, so instead of rendering 6 vertices, you rendered 4 in my case, as the 2 are the same. Is there a way to do it in GL? I know it can be done with vertex arrays, but I would rather not use them for such a simple task as rendering a quad.

Oh, but I forgot to ask. Im planning to use the 2D interface for a GUI (i got it to work with GDI coordinates, its fine), so if I have several quads and lines rendered with immediate mode, that would hurt performance, right? We are talking for about 10-12 quads at maximum though, thats 20-24 triangles -> 180 vertices?

Yes, OpenGL can also do triangle strips. Just use GL_TRIANGLESTRIP where you would normally have done GL_TRIANGLES. In your case you could also use GL_QUADS, but you should only use that if you are certain that all 4 vertices are coplanar.

Oh I see now. Yes, I don’t like using GL_QUADS because the vertices might not be coplanar.

Anyway, thanks!