does opengl do automatic optimal triangle rendering such as bounding boxes

Started by
2 comments, last by kenjin 21 years, 2 months ago
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
games rule
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.
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
-----------------------"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
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.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement