1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glGetAttachedShaders">
6 <refentrytitle>glGetAttachedShaders
</refentrytitle>
7 <manvolnum>3G
</manvolnum>
10 <refname>glGetAttachedShaders
</refname>
11 <refpurpose>Returns the handles of the shader objects attached to a program object
</refpurpose>
13 <refsynopsisdiv><title>C Specification
</title>
16 <funcdef>void
<function>glGetAttachedShaders
</function></funcdef>
17 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
18 <paramdef>GLsizei
<parameter>maxCount
</parameter></paramdef>
19 <paramdef>GLsizei *
<parameter>count
</parameter></paramdef>
20 <paramdef>GLuint *
<parameter>shaders
</parameter></paramdef>
24 <refsect1 id=
"parameters"><title>Parameters
</title>
27 <term><parameter>program
</parameter></term>
29 <para>Specifies the program object to be
34 <term><parameter>maxCount
</parameter></term>
36 <para>Specifies the size of the array for storing
37 the returned object names.
</para>
41 <term><parameter>count
</parameter></term>
43 <para>Returns the number of names actually returned
44 in
<parameter>objects
</parameter>.
</para>
48 <term><parameter>shaders
</parameter></term>
50 <para>Specifies an array that is used to return the
51 names of attached shader objects.
</para>
56 <refsect1 id=
"description"><title>Description
</title>
57 <para><function>glGetAttachedShaders
</function> returns the
58 names of the shader objects attached to
59 <parameter>program
</parameter>. The names of shader objects that
60 are attached to
<parameter>program
</parameter> will be returned
61 in
<parameter>shaders.
</parameter> The actual number of shader
62 names written into
<parameter>shaders
</parameter> is returned in
63 <parameter>count.
</parameter> If no shader objects are attached
64 to
<parameter>program
</parameter>,
<parameter>count
</parameter>
65 is set to
0. The maximum number of shader names that may be
66 returned in
<parameter>shaders
</parameter> is specified by
67 <parameter>maxCount
</parameter>.
</para>
69 <para>If the number of names actually returned is not required
70 (for instance, if it has just been obtained by calling
71 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>),
72 a value of
<constant>NULL
</constant> may be passed for count. If
73 no shader objects are attached to
74 <parameter>program
</parameter>, a value of
0 will be returned in
75 <parameter>count
</parameter>. The actual number of attached
76 shaders can be obtained by calling
77 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>
78 with the value
<constant>GL_ATTACHED_SHADERS
</constant>.
</para>
80 <refsect1 id=
"errors"><title>Errors
</title>
81 <para><constant>GL_INVALID_VALUE
</constant> is generated if
82 <parameter>program
</parameter> is not a value generated by
85 <para><constant>GL_INVALID_OPERATION
</constant> is generated if
86 <parameter>program
</parameter> is not a program object.
</para>
88 <para><constant>GL_INVALID_VALUE
</constant> is generated if
89 <parameter>maxCount
</parameter> is less than
0.
</para>
92 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
93 <para><citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>
94 with argument
<constant>GL_ATTACHED_SHADERS
</constant></para>
96 <para><citerefentry><refentrytitle>glIsProgram
</refentrytitle></citerefentry></para>
98 <refsect1 id=
"seealso"><title>See Also
</title>
99 <para><citerefentry><refentrytitle>glAttachShader
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glDetachShader
</refentrytitle></citerefentry></para>.
102 <refsect1 id=
"Copyright"><title>Copyright
</title>
104 Copyright
<trademark class=
"copyright"></trademark> 2003-
2005 3Dlabs Inc. Ltd.
105 This material may be distributed subject to the terms and conditions set forth in
106 the Open Publication License, v
1.0,
8 June
1999.
107 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.