Jump to content
  • Advertisement
Sign in to follow this  
Mooncabbage

Newb curiosity

This topic is 5410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering, what are the practical differences between GL_TRIANGLES, GL_QUADS, and GL_POLYGON? Wouldn't it just be simpler to draw everything as triangles? is it faster to draw "simpler" shapes like quads or polys or something? Just wondering.

Share this post


Link to post
Share on other sites
Advertisement
It's actually faster to use triangles. Quads and other polys are there for if you want to use them, but most drivers will convert them to several tri's anyways.

Share this post


Link to post
Share on other sites
If you use GL_POLYGON you can only draw one polygon in each glBegin/glEnd pair. This is very inefficient for large numbers of polys. If you use GL_TRIANGLES, you may be able to draw thousands and thousands of triangles in one chunk.

Basically, a triangle is as simple a polygon as you can come up with, so cards are designed to draw them very fast.

Share this post


Link to post
Share on other sites
tah. I more or less assumed that, but people where always going on about how good quads where back when i dabbled in 3d modelling, so i thought that there might have been something magical about them.

Share this post


Link to post
Share on other sites
only thing 'magical' about them is that they make for marginally clearer code when just drawing rectangles (for example, with a GUI), where the performance difference will be pretty much unnoticable.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Mooncabbage
tah. I more or less assumed that, but people where always going on about how good quads where back when i dabbled in 3d modelling, so i thought that there might have been something magical about them.


Quads are better in 3D modelling when using subsurfing(in blender) or HyperNURBS(in Cinema 4D). Basically it smooths out the model. If you try that with triangles, it looks messed up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!