QUADS vs. TRIANGLES

Started by
5 comments, last by masonium 22 years, 6 months ago
which is faster? Drawing a quad or two triangles using GL_TRIANGLES?
Advertisement
Quad- 4 vertex's
Triangle-3 vertex's *2

SO drawing 2 triangles needs 6 calls to glVertex3f, quads only need 4.

Quads are faster :\

"I've sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do'Urden

Edited by - Drizzt DoUrden on September 26, 2001 11:13:39 PM
------------------------------Put THAT in your smoke and pipe it
GL_TRIANGLE_STRIP

Quad- 4 vertex''s
Triangle -3 vertex''s *2
Triangle Strip - 4

Better to use GL_TRIANGLE_STRIP instead GL_TRIANGLES if you want to make a quad(ish)
could also be faster than using GL_QUADS, but not buy much, all depends on the hardware
The hardware/drivers are almost always optimized for triangles.
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
hi there,

If your using Vertex arrays use GL_QUADS
not GL_TRIANGL_STRIP as for each quad
you would have to make seperate calls
to glDrawArrays(..) as opposed to
one with GL_QUADS.

Hope it helps

Mark.
the triangle is used in much more hands than quads.
the quad can only make the regular objects,but triangle is the basis of polygons,so every ploygon and complex objects r made of triangles.and triangle-strip is convenient and fast to use in modeling.
for these reasons,i think triangle is more powerful than quad.

jerry2
Programming,make a whole new world.
jerry2The God creates the world, the world creates the nature,the nature creates human. Human create...Everything.
Quads cannot handle convex or concave surfaces.
In other words, all 4 points muct lie on a plane.
3 points are the minimum needed to define a plane, so Tri handle wierd shapes better.
So it all comes down to what you are doing.

Landscapes you probably want Tris.
For other things you probably want a mixture.
V''lion


I came, I saw, I got programmers block.
~V''''lion
~V'lionBugle4d

This topic is closed to new replies.

Advertisement