I am trying to implement batch rendering, where I pass a large number of triangle vertexes and corresponding object data (like texture control flags, extra variables, etc.). Right now, each sprite has just over 164 bytes of data. I know that OpenGL has at least 16 vertex attributes, with each element having the size of 4 floats. A lot of batch rendering tutorials use them, but they never try to pass that much data for each object.
I was thinking about separating all 164 bytes of data into chunks of 12 bytes, and loading them all into 16 vertex attributes. However, I’ve readabout the attributes reserved by OpenGL for various purposes, which means I can’t use them.
Technically, of the 164 bytes, 20 bytes are used for vertex/uv coordinates, while the rest are per object (so they remain the same for the same object). I want to do batch rendering for 10 000 objects, and that requires 1.44 megabytes of non-vertex/uv coordinate data.
I would like to know what other options I have, that allow passing that much data for batch rendering (with decent performance that is better than enormous uniform arrays).