void glAttachShader(GLuint program, GLuint shader);
All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to attach a shader object to more than one program object. If a shader object is deleted while it is attached to a program object, it will be flagged for deletion, and deletion will not occur until glDetachShader() is called to detach it from all program objects to which it is attached.
GL_INVALID_OPERATION is generated if program is not a program object.
GL_INVALID_OPERATION is generated if shader is not a shader object.
GL_INVALID_OPERATION is generated if shader is already attached to program.
|Function / Feature Name||2.0||2.1||3.0||3.1||3.2||3.3||4.0||4.1||4.2||4.3||4.4||4.5|
Copyright © 2010-2014 Khronos Group