Jump to content
  • Advertisement
Sign in to follow this  
Cornstalks

Ways To Improve Rendering Code? [solved]

This topic is 4486 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'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]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MikeTacular
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?
'Frustum culling'.

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.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!