Jump to content
  • Advertisement
Sign in to follow this  
neiluk

Opengl and polygon culling

This topic is 4426 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

Hi, maybe a stupid question, but when opengl doesnt draw polygons outside the view area, does it still take as much work to process these non drawn triangles. Just wondering if its worth me checking in the code myself if sections of my level are outside the draw area and not drawing them before hand. All the polygon data is already held in arrays and isnt changed so i wouldnt be saving anytime on calculations, just calls to glVertex, glColor and glNormal inside a big for loop

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by neiluk
Hi, maybe a stupid question, but when opengl doesnt draw polygons outside the view area, does it still take as much work to process these non drawn triangles. Just wondering if its worth me checking in the code myself if sections of my level are outside the draw area and not drawing them before hand. All the polygon data is already held in arrays and isnt changed so i wouldnt be saving anytime on calculations, just calls to glVertex, glColor and glNormal inside a big for loop
The most important improvement in performance you could make would be to switch from immediate mode to vertex arrays if you haven't done so already.

As for large-scale culling, it depends (among other things) on how many polygons are in your scene compared to how many are typically visible at one time. If the ratio is large, then properly implemented frustum culling may very well be a win. But if you're just dealing with a few hundreds or perhaps thousands of polygons, it may not be worth it (but again, it depends).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!