Is there a way to tell GL to render indices (a) to (b) as non-textured geometry using vertex and color pointers, and then render indices (a+1) to (c) as textured triangles using vertex, texture, and color pointers?Desired Functionality:
I want to store geometry and sprite information in the same VBO used for batching. My batch class will sort geometry first in the VBO, then sort sprites using a texture atlas.Research:
I have looked at a lot of material online, but I have not seen a use case similar to what I am going for. Perhaps it is not possible, and I will simply have to use two VBOs or draw geometry in immediate mode.lwjgl.org VBO tutorialmattdesl openGL tutorials
and random Goggling.What I came up with:
So I gave up on the idea of packing all the data into one VBO, what I do know is pack all geometry into the VBO, draw it, then pack all the sprites into the VBO and draw it. Each with their respective pointers. What I did to help facilitate this is set up a batch for the batch, so to speak. I have a class that stores all the float buffers, organizes them by type (geometry or sprite) puts them together, flips, buffers the data, and draws. I will more than likely post my code in the shared code, at such time this will all be replaced with a link.