Three questions about shader programs (not the vertex or fragment, but the entire program after compilation):
-
What is the difference between glLinkProgram() and glUseProgram()? it sounded to me in the spec that glLinkProgram() would also cause the shader program to be in use for the pipeline, and if so, then what’s the use for glUseProgram()?
-
What is the overhead to switch from program to program within a frame of rendering? Would it be reasonable that I could do at least 3-4 times without seeing a major performance hit from the switching?
-
How does the fixed-function pipeline compare in speed to a basic shader program (ie one that’s not doing too much where it’s obvious that it’d run slower).