Description:
I have installed a program object using glUseProgram(). It works fine.
Now, at some point, I want to revert to the original program object "state" which is nothing custom installed.
Question:
How is it supposed to be done on OS X?
Things I've tried so far after looking at the doc, sample code, google results.
• glUseProgram(0) is documented as not being the solution by the man page (even though it's used in Apple's FBOBunnies sample code). And indeed, it apparently does not remove/disable the program.
• glDeleteProgram() does not work.
• glGetIntegerv(GL_CURRENT_PROGRAM,&originalProgram); sets originalProgram to 0. So not very helpful when calling glDeleteProgram with originalProgram.
• detaching the shader from the current program produces black pixels (i.e. either no pixel is rendered or they are all black).
This seems to be a pretty basic thing to do but I haven't found a clear answer and a solution that works so far.