glLinkProgram Function

Syntax

GL_APICALL void GL_APIENTRY glLinkProgram(
     GLuint program
);

Parameters

Name Description
in program Program object to link

Return Values

No values are returned.

Description

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_VALUEThe program argument was set to an invalid value.
GL_OUT_OF_MEMORYFailed 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.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL