#### Archived

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

# 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.

## 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 on other sites
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).

1. 1
Rutin
48
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633409
• Total Posts
3011718
• ### Who's Online (See full list)

There are no registered users currently online

×