glLinkProgram Function
GL_APICALL void GL_APIENTRY glLinkProgram(
GLuint program
);
| Name | Description | |
|---|---|---|
| in | program | Program object to link |
Links a program object.
Set program to a program object, and this function will link the shader objects attached to program. When a program has been successfully linked, glUseProgram can embed it as the current program in the rendering pipeline. The program has been successfully linked if you get GL_TRUE from glGetProgramiv with pname set to GL_LINK_STATUS. Linking has failed if you get a value of GL_FALSE.
This function generates the following errors.
| GL_INVALID_VALUE | The program argument was set to an invalid value. |
|---|---|
| GL_OUT_OF_MEMORY | Failed to allocate the management region. |
Linking fails when program is waiting to be deleted; when the vertex and fragment shaders are not attached; when the attached vertex and geometry shaders were not loaded at the same time by glShaderBinary; and when there are more than 2048 total uniform variables for the attached vertex and geometry shaders.
CONFIDENTIAL