| 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="errors"><title>Errors</title> |
| 81 | <para><constant>GL_INVALID_VALUE</constant> is generated if |
| 82 | <parameter>program</parameter> is not a value generated by |
| 83 | OpenGL.</para> |
| 84 | |
| 85 | <para><constant>GL_INVALID_OPERATION</constant> is generated if |
| 86 | <parameter>program</parameter> is not a program object.</para> |
| 87 | |
| 88 | <para><constant>GL_INVALID_VALUE</constant> is generated if |
| 89 | <parameter>maxCount</parameter> is less than 0.</para> |
| 90 | |
| 91 | </refsect1> |
| 92 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 93 | <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> |
| 94 | with argument <constant>GL_ATTACHED_SHADERS</constant></para> |
| 95 | |
| 96 | <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para> |
| 97 | </refsect1> |
| 98 | <refsect1 id="seealso"><title>See Also</title> |
| 99 | <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>, |
| 100 | <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry></para>. |
| 101 | </refsect1> |
| 102 | <refsect1 id="Copyright"><title>Copyright</title> |
| 103 | <para> |
| 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>. |
| 108 | </para> |
| 109 | </refsect1> |
| 110 | </refentry> |