I've searched for a definitive answer to this but to no avail. The OpenGL specs seem to be silent on this, but that may be due to my inexperience in reading them. I am not concerned with how implementations behave with regard to this issue. Thanks.
From here:
While a program object is in use, applications are free to modify attached shader objects, compile attached shader objects, attach additional shader objects, and detach or delete shader objects. None of these operations will affect the executables that are part of the current state. However, relinking the program object that is currently in use will install the program object as part of the current rendering state if the link operation was successful...
So yes, it is legal, and it will have no effect until you relink the program.
And relink the current program automatically install the new version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With