glGetAttachedShaders Function

Syntax

GL_APICALL void GL_APIENTRY glGetAttachedShaders(
     GLuint program,
     GLsizei maxcount,
     GLsizei * count,
     GLuint * shaders
);

Parameters

Name Description
in program Program object
in maxcount Maximum number of shader object names to get
out count Region storing the number of shader objects obtained in shaders
out shaders Array storing the shader object names

Return Values

No values are returned.

Description

Gets the names of shader objects that have been attached to a program.

Set program to the program object.

Use maxcount to specify the size of the array set in shaders.

The count argument stores the number of shader objects obtained in shaders.

The shaders argument stores the shader objects attached to program.

It is all right to set count to NULL, because you can get the same value (that would otherwise be set in count) by specifying GL_ATTACHED_SHADERS to glGetProgramiv.

This function generates the following errors.

GL_INVALID_VALUEThe program argument was set to an invalid value, or maxcount is negative.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL