Edit: New Question below
I am in the process of coming up with a way to get rid of the use of GLBegin and GLEnd in my program.
Now in my game, each map has multiple layers(top, middle, bottom and players)(each map may even have layers below layers, but ignore that for now) that need to be rendered. Before when I was using GL_Begin it was as easy as figuring out what part of the map I was rendering and then calling GLVertex for each tile that is visible.
I have tried GLDrawArrays but the problem is that my program then uses a lot of memory as I have vertexArrays and TextureArrays for each layer, and this is a lot more than just storing the X and Y and textureID of each tile in memory and rendering each frame.
As I am using quads, it’s 8 different floats for each tile that have to be stored in there and then another 8 for the textures as well.
So I guess my question is, what would be the best way to store the data, I know that Vertex Data can be stored on the graphics card using a VBO but I’m not entirely sure how to go about it.Ideally I’d like to be able to render just bits of the map.
Also, the map will not be static, users will be able to modify the tiles as they play.