Ways To Improve Rendering Code? [solved]
I'm using OpenGL and C++. I've been making a game engine lately, and I've got it to the point where I can draw objects by drawing each polygon. Other engines seem to be able to ignore drawing objects once they are out of the screen. How would you do this?
[Edited by - MikeTacular on March 12, 2006 5:45:46 PM]
Quote:Original post by MikeTacular'Frustum culling'.
I'm using OpenGL and C++. I've been making a game engine lately, and I've got it to the point where I can draw objects by drawing each polygon. Other engines seem to be able to ignore drawing objects once they are out of the screen. How would you do this?
OpenGL can cull individual triangles much faster than you can. Frustum culling becomes useful though when you have many, many triangles and can group them together in some meaningful way, such as by object, or in a hierarchical structure such as an octree. In these cases frustum culling can greatly accelerate rendering.
If you want to perform frustum culling yourself, the first step is to construct the frustum planes given the current camera and projection matrices. A good article on how to do this can be found here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement