Jump to content
  • Advertisement

Archived

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

tHiSiSbOb

frustrum culling

This topic is 6010 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. I just have a simple question about frustrum culling. I have not looked at any tutorials but i had an idea about how i might do it and i wanted to know if it would work. Here goes A variable is used to rotate the view. When this value is incramented the view is changed. If the glRotatef function works like i think, then what it does is change the view according to the vale of cos(var)*(3.14/180). So if we wanted to only draw the polygons that were in our viewing frustrum then couldn''t u do something like //var is the variable used to rotate. if(vertex+45 <=(cos(var))*(3.14/180)&&vertex-45 >=(cos(var))*(3.14/180)) //Draw Stuff and something similar for the y axis.

Share this post


Link to post
Share on other sites
Advertisement
I don''t know if that would work, but it seems calling COS() every frame would be a timely operation. Check out the tutorial at http://www.markmorley.com, it explains the process of frustrum culling very well. Then, checking vertices for visibility in the current frustrum is as simple as doing the "plane equation" using the vertex against all the planes in the frustrum (there''s six of them).

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!