a Question of OpenGL Programming with Big Scene

I am a learner of OpenGL and plan to write a OpenGL game. The game has a large scene,but I only need draw a very little part in the window everytime. So it is very wasteful to draw the whole scene.What method I can use to solve this problem?

Do a search on “frustrum culling”. It’s what you need.


but i can not use display list anymore

Originally posted by Furrage:
Do a search on “frustrum culling”. It’s what you need.

Based on previous discussions it appears that display lists are best used for sections of your scene instead of the whole scene. So all the poly’s of a tank can be in one display list, but different types of tanks would be in display lists. You can cull these lists by creating a bounding box/shape for them. If part (this includes all) of the bounding box is in the frustrum, draw it and let OpenGL take care of clipping. If the bounding box is outside the frustrum ignore it as the display list would not be seen anyway.

Terrain is a different matter because only a small part of it is on screen at any one time. This makes terrains a perfect candidate for frustrum culling, and not display lists. If you want to use display lists with terrain break the terrain into sectors, place the sectors in dispaly lists, build bounding boxes for the sectors, and cull away sectors that can’t be seen.