View Full Version : Quads vs Tris
10-13-2000, 11:00 PM
Is there any advantage/disadvantage to passing data to OpenGL as quads over tris?
[This message has been edited by TCBdev (edited 10-14-2000).]
The only advantage would be two less calls to glVertex (and maybe glNormal and glColor aswell). One quad is two triangles, even if you pass it as triangles or a single quad.
10-14-2000, 02:31 AM
Maybe there is one disadvantage. Four vertices needn't be in one plane. So if you are working with plane-normals (or in this case, quad-normals), it is sometimes impossible to find a normal with four vertices.
But aside from this I can see no disadvantage
Bob: If you use a triangle strip to draw the 2 triangles, then you're not gaining (nor loosing) anything from using quads.
A more subtle issue concerns how the quad is tessellated. In most systems, the quad will be split into two triangles, which are then rasterized. This is fine, except there are two choices of diagonals. If you don't care how these diagonals are chosen, then it doesn't matter. Otherwise, be careful, since it does affect vertex lighting.
xvs: Err, yes, of course, you are right. But honestly, how much do we gain/loose by drawing a quad in these different ways. Whatever way we use, we will hardly notice a difference unless you are drawing millions of them.
10-15-2000, 10:43 AM
The goal is to have all quads be planar when they go to be rasterized. There is a chance, though, that some will not be totally palnar and the direction of the edge will be important. How do you determine the direction that the edge travels?
10-24-2000, 02:17 AM
I have read somewhere that the graphic cards are actually optimised to draw triangles, so does opengl split the quads into 2 triangles itself or the coder must do it ?
10-24-2000, 02:59 AM
Most cards are transforming anything you sent them to triangles strips, so sending directly TRIANGLE_STRIP(s) to them will avoid spending time on software (drivers) conversion.
Learn the hardware before writting software...
[Nice Advice I read somewhere http://www.opengl.org/discussion_boards/ubb/wink.gif ]
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.