Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refentrytitle>glGetAttachedShaders</refentrytitle> | |
7 | <manvolnum>3G</manvolnum> | |
8 | </refmeta> | |
9 | <refnamediv> | |
10 | <refname>glGetAttachedShaders</refname> | |
11 | <refpurpose>Returns the handles of the shader objects attached to a program object</refpurpose> | |
12 | </refnamediv> | |
13 | <refsynopsisdiv><title>C Specification</title> | |
14 | <funcsynopsis> | |
15 | <funcprototype> | |
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> | |
21 | </funcprototype> | |
22 | </funcsynopsis> | |
23 | </refsynopsisdiv> | |
24 | <refsect1 id="parameters"><title>Parameters</title> | |
25 | <variablelist> | |
26 | <varlistentry> | |
27 | <term><parameter>program</parameter></term> | |
28 | <listitem> | |
29 | <para>Specifies the program object to be | |
30 | queried.</para> | |
31 | </listitem> | |
32 | </varlistentry> | |
33 | <varlistentry> | |
34 | <term><parameter>maxCount</parameter></term> | |
35 | <listitem> | |
36 | <para>Specifies the size of the array for storing | |
37 | the returned object names.</para> | |
38 | </listitem> | |
39 | </varlistentry> | |
40 | <varlistentry> | |
41 | <term><parameter>count</parameter></term> | |
42 | <listitem> | |
43 | <para>Returns the number of names actually returned | |
44 | in <parameter>objects</parameter>.</para> | |
45 | </listitem> | |
46 | </varlistentry> | |
47 | <varlistentry> | |
48 | <term><parameter>shaders</parameter></term> | |
49 | <listitem> | |
50 | <para>Specifies an array that is used to return the | |
51 | names of attached shader objects.</para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | </variablelist> | |
55 | </refsect1> | |
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> | |
68 | ||
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> | |
79 | </refsect1> | |
80 | <refsect1 id="notes"><title>Notes</title> | |
81 | <para><function>glGetAttachedShaders</function> | |
82 | is available only if the GL version is 2.0 or greater.</para> | |
83 | </refsect1> | |
84 | <refsect1 id="errors"><title>Errors</title> | |
85 | <para><constant>GL_INVALID_VALUE</constant> is generated if | |
86 | <parameter>program</parameter> is not a value generated by | |
87 | OpenGL.</para> | |
88 | ||
89 | <para><constant>GL_INVALID_OPERATION</constant> is generated if | |
90 | <parameter>program</parameter> is not a program object.</para> | |
91 | ||
92 | <para><constant>GL_INVALID_VALUE</constant> is generated if | |
93 | <parameter>maxCount</parameter> is less than 0.</para> | |
94 | ||
95 | <para><constant>GL_INVALID_OPERATION</constant> is generated if | |
96 | <citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry> | |
97 | is executed between the execution of | |
98 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
99 | and the corresponding execution of | |
100 | <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para> | |
101 | </refsect1> | |
102 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
103 | <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> | |
104 | with argument <constant>GL_ATTACHED_SHADERS</constant></para> | |
105 | ||
106 | <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para> | |
107 | </refsect1> | |
108 | <refsect1 id="seealso"><title>See Also</title> | |
109 | <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>, | |
110 | <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry></para>. | |
111 | </refsect1> | |
112 | <refsect1 id="Copyright"><title>Copyright</title> | |
113 | <para> | |
114 | Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd. | |
115 | This material may be distributed subject to the terms and conditions set forth in | |
116 | the Open Publication License, v 1.0, 8 June 1999. | |
117 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
118 | </para> | |
119 | </refsect1> | |
120 | </refentry> |