   [GLSL] Setting all uniform variables per object VS multiple program 'instances'
  Hi,I'm currently working on a shader system, and not sure what is the best option in this case: Link a program once, and re-set the uniform variables for every object requiring different values, or link the program multiple times and bind the program 'instance' used by the current object.While the first option seems attractive as it requires less memory, the second option may be faster because it saves setting all uniform variables for every rendered object.Also, since I'm programming in Java, there is some overhead associated with every call to OpenGL (or any other native code) I make. It's nothing too serious, but definitely something I have too keep in mind in cases like this.Can anyone offer me some insight in what's the best way to go here? Thanks in advance!   
  There are things called "uniform buffer objects". I'm only learning about them myself, but they appear to do the sort of thing you're trying.You apparently set them up in a similar way to attribute buffer objects, and everytime you rebind them, your uniforms are magically reset.Let me know if they turn out to be useful!! :-)