title: OpenGL - switch shaders
body: <p>I'm trying to get my head around the following:</p>
  
  <p>I've an object that I want to be able to render with two different sets of vertex/fragment shaders, that each have their uniforms and textures, and go back and forth between those two settings. (I know in this case I could have just one shader with a uniform dictating which logic to run, but this is part of a larger things where I can't do that)</p>
  
  <ul>
  <li>Should I use one or two gl programs (created by <code>glCreateProgram()</code>)?</li>
  <li>If I use two programs, is it fine to discard the one not being used, and rebuild it if need later on? Or is it too slow?</li>
  <li>If I use just one program:
  
  <ul>
  <li>can I compile shaders just once at the beginning?</li>
  <li>when switching should I detach old shaders, attach new ones and link the program again?</li>
  <li>should I recompute all uniforms locations after linking?</li>
  <li>should I rebind array buffers after linking?</li>
  <li>should I do something to remove previously attached textures?</li>
  </ul></li>
  </ul>