I'm making a cube-world-game like Minecraft. And to render it I've splitted it in 16x16x16 blocks regions (also known as chunks in mc) and then, on rendering, I take all the chunks in the rendering distance area and foreach of them I iterate all blocks and draw them.
It's so slow.
Then I tryed to remove hidden blocks and draw only visible faces of blocks. I made a VBO that store a face and then using model matrix I rotate it to make the other sides of the block. Finally I added a camera frustum test that checks if the block is visible from the camera.
I didn't code yet all these things, that's just a reasoning.
Are these optimization good or could I add something else?
P.S: I've seen that minecraft use a "display list" foreach chunk and not use a VBO for a face (I've didn't understand the code well since part of it is obfuscated) and each loop get just the rendering distance chunks and draw them using the display list stored. How's possible making a display list with all the shape of the chunk? There's another thing that does the same thing of the display list but it's not deprecated (I though VBO but I'm not sure)?