glGetProgramiv Function

Syntax

GL_APICALL void GL_APIENTRY glGetProgramiv(
     GLuint program,
     GLenum pname,
     GLint * params
);

Arguments

Name Description
in program Program object
in pname Name of the parameter to get
out params Region storing the obtained parameters

Return Values

No values are returned.

Description

Gets program object parameters.

Set program to the program object.

Set pname to one of the following values.

GL_DELETE_STATUSGets GL_TRUE if the program object is waiting to be deleted and GL_FALSE otherwise. A program object in use by glUseProgram begins "waiting to be deleted" when glDeleteProgram is called on it.
GL_LINK_STATUSGets GL_TRUE if the program object has been successfully linked by glLinkProgram and GL_FALSE otherwise.
GL_INFO_LOG_LENGTHAlways gets a value of 0.
GL_ATTACHED_SHADERSGets the number of shader objects attached to the program.
GL_ACTIVE_ATTRIBUTESGets the number of active vertex attributes in the program.
GL_ACTIVE_ATTRIBUTE_MAX_LENGTHGets the number of characters in the name of the longest-named active vertex attribute in the program. A NULL terminator is also included in the character count.
GL_ACTIVE_UNIFORMSGets the number of active uniforms in the program.
GL_ACTIVE_UNIFORM_MAX_LENGTHGets the number of characters in the name of the longest-named active uniform in the program. A NULL terminator is also included in the character count.

This function generates the following errors.

GL_INVALID_ENUMThe pname argument was set to an invalid value.
GL_INVALID_VALUEThe program argument was set to an invalid value.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL