PDA

View Full Version : speed of GL_QUADS



rgreene
09-26-2002, 10:00 AM
I'm currently using quads as source input for a vertex program to produce billboards. Right now, I'm calling glDrawArrays (), and I was wondering if by switching over to using triangle fans/strips using glDrawElements () I could attain better performance. My gut feeling is that there is no performance diffrence, am I right?

fresh
09-26-2002, 03:39 PM
Most hardware will draw it as a tristrip. I'd recommend you move over to tristrips/fans because you dont know how the driver will divide the rectangle intro tris. There is more than one way and it may not be the way you want it.

*---*
| /|
| / |
*/__|

*---*
|\ |
| \ |
*__\|

SirKnight
09-26-2002, 04:11 PM
*---*
| /|
| / |
*/__|

*---*
|\ |
| \ |
*__\|


Fixed it for ya. http://www.opengl.org/discussion_boards/ubb/biggrin.gif

-SirKnight

[This message has been edited by SirKnight (edited 09-26-2002).]

Leyder Dylan
09-26-2002, 04:54 PM
Use GL_TRIANGLES, more fastest.

knackered
09-27-2002, 12:38 AM
No, GL_TRIANGLES will not be faster.
For a single quad drawn with GL_TRIANGLES you'd have to send either 6 vertices, or 4 vertices and 6 indices - compare that to the 4 vertices and 4 indices for GL_TRIANGLE_STRIP, or the 4 vertices and 4 indices for GL_QUAD.