include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / glDetachShader.xml
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="glDetachShader">
5 <refmeta>
6 <refentrytitle>glDetachShader</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glDetachShader</refname>
11 <refpurpose>Detaches a shader object from a program object to which it is attached</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glDetachShader</function></funcdef>
17 <paramdef>GLuint <parameter>program</parameter></paramdef>
18 <paramdef>GLuint <parameter>shader</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22 <refsect1 id="parameters"><title>Parameters</title>
23 <variablelist>
24 <varlistentry>
25 <term><parameter>program</parameter></term>
26 <listitem>
27 <para>Specifies the program object from which to
28 detach the shader object.</para>
29 </listitem>
30 </varlistentry>
31 <varlistentry>
32 <term><parameter>shader</parameter></term>
33 <listitem>
34 <para>Specifies the shader object to be
35 detached.</para>
36 </listitem>
37 </varlistentry>
38 </variablelist>
39 </refsect1>
40 <refsect1 id="description"><title>Description</title>
41 <para><function>glDetachShader</function> detaches the shader
42 object specified by <parameter>shader</parameter> from the
43 program object specified by <parameter>program</parameter>. This
44 command can be used to undo the effect of the command
45 <citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>.</para>
46
47 <para>If <parameter>shader</parameter> has already been flagged
48 for deletion by a call to
49 <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>
50 and it is not attached to any other program object, it will be
51 deleted after it has been detached.</para>
52 </refsect1>
53 <refsect1 id="errors"><title>Errors</title>
54 <para><constant>GL_INVALID_VALUE</constant> is generated if either
55 <parameter>program</parameter> or <parameter>shader</parameter>
56 is a value that was not generated by OpenGL.</para>
57
58 <para><constant>GL_INVALID_OPERATION</constant> is generated if
59 <parameter>program</parameter> is not a program object.</para>
60
61 <para><constant>GL_INVALID_OPERATION</constant> is generated if
62 <parameter>shader</parameter> is not a shader object.</para>
63
64 <para><constant>GL_INVALID_OPERATION</constant> is generated if
65 <parameter>shader</parameter> is not attached to
66 <parameter>program</parameter>.</para>
67
68 </refsect1>
69 <refsect1 id="associatedgets"><title>Associated Gets</title>
70 <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
71 with the handle of a valid program object</para>
72
73 <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
74 with arguments <parameter>shader</parameter> and
75 <constant>GL_DELETE_STATUS</constant></para>
76
77 <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
78
79 <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
80 </refsect1>
81 <refsect1 id="seealso"><title>See Also</title>
82 <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry></para>
83 </refsect1>
84 <refsect1 id="Copyright"><title>Copyright</title>
85 <para>
86 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
87 This material may be distributed subject to the terms and conditions set forth in
88 the Open Publication License, v 1.0, 8 June 1999.
89 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
90 </para>
91 </refsect1>
92 </refentry>