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="glDeleteShader"> | |
5 | <refmeta> | |
6 | <refentrytitle>glDeleteShader</refentrytitle> | |
7 | <manvolnum>3G</manvolnum> | |
8 | </refmeta> | |
9 | <refnamediv> | |
10 | <refname>glDeleteShader</refname> | |
11 | <refpurpose>Deletes a shader object</refpurpose> | |
12 | </refnamediv> | |
13 | <refsynopsisdiv><title>C Specification</title> | |
14 | <funcsynopsis> | |
15 | <funcprototype> | |
16 | <funcdef>void <function>glDeleteShader</function></funcdef> | |
17 | <paramdef>GLuint <parameter>shader</parameter></paramdef> | |
18 | </funcprototype> | |
19 | </funcsynopsis> | |
20 | </refsynopsisdiv> | |
21 | <refsect1 id="parameters"><title>Parameters</title> | |
22 | <variablelist> | |
23 | <varlistentry> | |
24 | <term><parameter>shader</parameter></term> | |
25 | <listitem> | |
26 | <para>Specifies the shader object to be deleted.</para> | |
27 | </listitem> | |
28 | </varlistentry> | |
29 | </variablelist> | |
30 | </refsect1> | |
31 | <refsect1 id="description"><title>Description</title> | |
32 | <para><function>glDeleteShader</function> frees the memory and | |
33 | invalidates the name associated with the shader object specified | |
34 | by <parameter>shader</parameter>. This command effectively | |
35 | undoes the effects of a call to | |
36 | <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>.</para> | |
37 | ||
38 | <para>If a shader object to be deleted is attached to a program | |
39 | object, it will be flagged for deletion, but it will not be | |
40 | deleted until it is no longer attached to any program object, | |
41 | for any rendering context (i.e., it must be detached from | |
42 | wherever it was attached before it will be deleted). A value of | |
43 | 0 for <parameter>shader</parameter> will be silently | |
44 | ignored.</para> | |
45 | ||
46 | <para>To determine whether an object has been flagged for | |
47 | deletion, call | |
48 | <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry> | |
49 | with arguments <parameter>shader</parameter> and | |
50 | <constant>GL_DELETE_STATUS</constant>.</para> | |
51 | </refsect1> | |
52 | <refsect1 id="notes"><title>Notes</title> | |
53 | <para><function>glDeleteShader</function> is available only if | |
54 | the GL version is 2.0 or greater.</para> | |
55 | </refsect1> | |
56 | <refsect1 id="errors"><title>Errors</title> | |
57 | <para><constant>GL_INVALID_VALUE</constant> is generated if | |
58 | <parameter>shader</parameter> is not a value generated by | |
59 | OpenGL.</para> | |
60 | ||
61 | <para><constant>GL_INVALID_OPERATION</constant> is generated if | |
62 | <function>glDeleteShader</function> is executed between the | |
63 | execution of | |
64 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
65 | and the corresponding execution of | |
66 | <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para> | |
67 | </refsect1> | |
68 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
69 | <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry> | |
70 | with the program object to be queried</para> | |
71 | ||
72 | <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry> | |
73 | with arguments <parameter>shader</parameter> and | |
74 | <constant>GL_DELETE_STATUS</constant></para> | |
75 | ||
76 | <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para> | |
77 | </refsect1> | |
78 | <refsect1 id="seealso"><title>See Also</title> | |
79 | <para><citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>, | |
80 | <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>, | |
81 | <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>, | |
82 | <citerefentry><refentrytitle>glUseProgram</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> |