Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kenjin

OpenGL does opengl do automatic optimal triangle rendering such as bounding boxes

This topic is 5671 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 all, I was wondering if I have a game maze will opengl draw all the triangles out that aren''t in view of the viewing window or will it know not to draw these automaticallyl. I''ve heard of bounding box methods where it only draws object that are in view which is more efficient. But does anybody know what the default is? I''m making a game and I''m wondering if the whole map is loaded in or does just parts of it that are needed are displayed. -Kenjin

Share this post


Link to post
Share on other sites
Advertisement
you have to define a frustum,if the point, box, sphere, triangle, etc is in the frustum you render it,otherwise you dont, search for "frustum culling" in google,also see the opengl tutorials in gametutorials.com. It''s really easy once you have the concept.

Share this post


Link to post
Share on other sites
OpenGL does automatically cull objects outside of the view frustum, however you can speed it up a lot by using a method of partitioning your world geometry, and culling large amounts of geometry on your cpu.

Octrees and Quadtrees are VERY efficient when it comes to this, BSP trees do a good job as well.

-----------------------
"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

Share this post


Link to post
Share on other sites
well.. opengl at least wont/cant write the result to the frame buffer, but it will check/cull/clip every single triangle which obviously is a lot slower than a short test to remove hundreds/thousands of triangles yourself.

Share this post


Link to post
Share on other sites

  • 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!