I've been trying to work out a way to pass an array of structs to GLSL. I know that you can pass arrays, but they need to be a fixed size. On the CPU I store all my structs in a std::vector. I know there are uniform buffer objects that newer versions of GLSL have, but I want to keep compatibility for older systems. I've heard the idea of making an array with more than I could possibly ever need and filling it up with only a few, but I'm pretty sure that would allocate the memory for every one, even the not ones in use. If you could give me a tip or article, or even point me in the right direction, I would appreciate it.