Hello and thank you for reading and potentially helping with my problem.
I have been a hobbyist programmer for a long time, with spurts of activity. I have started up again recently and decided to get back to my main driving interest, which was game engine design. I am wanting to make a extremely small(just a 100x100 block) cave with a voxel engine, that will be used for a tower defense game vs simple AI.
Have spent last 2 weeks rereading about voxels and peoples implementations and experiences. Now that I have decided on how I want to approach it I have hit a snag, This is more with the engine design than anything else, and how rusty I have gotten with my programming.
I'm embarrassingly stuck on how, and where, to create the vertex buffer object. I was going with the approach in including it with the sector class(chunks) so that each sector had it's own vbo and vao. Yet the vao would require the shaders when setting it, so would each sector have an array of the shaders that it could use?
I am also unsure where to implement the textures for the blocks. I obviously am representing the texture for each block as a byte with an enum for the type. Yet, should I have the sector(chunk) class have its own render function so each sector can render itself when called or do all the rendering from the main program and just retrieving the vbo and vao from the sector class?
In relation to this, how and where do I set the texture when rendering? Would you create a LIST containing each block in the Sector that holds its texture, shaders, vbo and vao when the sector is loaded?
Again thanks for any help in this regards.