Perhaps this Wikipedia article provides a very basic introduction to the field of culling techniques.
A good starting point and one of the simplest methods is to discard a truncated cone. Using this method, you check each object in its scene if it is inside the viewing volume (truncation view). This basically comes down to checking some simplified bounding volume of the geometry (for example, a box or a sphere that completely contains the geometry) if it lies inside the viewing truncation defined by six planes.
This can be further optimized by grouping objects by their position and creating a so-called hierarchy of bounding volumes, so you, for example, first check if the entire city block is inside the viewing volume (using the bounding volume that contains the whole block), and only if so, do you also check out individual homes.
A more complex method is rejection of the occlusion, which means checking whether the object is completely hidden behind another object. Since these methods can be significantly complicated, they should (if done) really be executed after the image is rejected. OpenGL has hardware occlusal queries that can help you determine whether the object is actually visible, but this requires additional work. Especially for cities, there may be special two-dimensional methods for rejecting occlusion (I have heard about this for a long time, I do not know).
This is just a very general overview, feel free to google for individual keywords. It is always a good idea to carefully weigh if it requires additional processor costs (especially with complex methods of rejecting occlusion), given that the current trend is to collect as much geometry as possible in a single callback (by the way I hope you do not use the immediate glBegin/glEnd , otherwise it will change to vertex arrays or better VBOs - this is the first item on your agenda). But viewing a breakaway truncation can be a pleasant and easy starting point, especially if the city is becoming quite large.
source share