To what extent does OpenGL do occlusion culling?

I am making a 2D game. My game has different floors in a top-down view. Floors can have transparent parts so parts of floor beneath will need to be rendered.

I tested getting OpenGL to draw the entire thing. Will it matter if I do that?

I’ve noticed OpenGL ignores everything outside the viewing area but what about things underneath?

Depends on how you draw it, if you render each floor from bottom to top then it will be visible otherwise not.

again it depends on how many floors you render, if it’s a lot then you might want to limit the amount of floors you render at once to like 5 or 10, though your hardware could probably manage way more than that.

Thank you for the reply.

I have 5 floors maximum. You think reasonably modern graphics cards can handle this fine?

5 x overdraw shouldn’t be too bad in most cases, especially with 2D stuff. Why not mock up a quick and dirty demo that contains nothing but your worst-case rendering code and go try it on a handful of machines? You’ll find out if it’s OK quickly enough.

I can only test it easily on the machine I’m on. I think I’ll draw everything and worry about it later if I come to later problems.

Thank you.