Running openGL 3.1, the question is simple.
From the GLSL site, here's how to define an array of single buffer blocks:
uniform BlockName
{
vec3 blockMember1, blockMember2;
float blockMember3;
} multiBlocks[3];
Now, is it possible to have a dynamic number of these multiblocks? There are no pointers in GLSL, so no "new" statements, etc.
If not, is there another approach for sending a dynamic number of elements? My block currently packs four floats and one vec2.
I haven’t written shaders yet, so you can offer something, thanks;)
Raven source
share