Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glDeleteProgram">
    <refmeta>
        <refentrytitle>glDeleteProgram</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glDeleteProgram</refname>
        <refpurpose>Deletes a program object</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glDeleteProgram</function></funcdef>
                <paramdef>GLuint <parameter>program</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
            <varlistentry>
                <term><parameter>program</parameter></term>
                <listitem>
                    <para>Specifies the program object to be
                    deleted.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para><function>glDeleteProgram</function> frees the memory and
        invalidates the name associated with the program object
        specified by <parameter>program.</parameter> This command
        effectively undoes the effects of a call to
        <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>.</para>

        <para>If a program object is in use as part of current rendering
        state, it will be flagged for deletion, but it will not be
        deleted until it is no longer part of current state for any
        rendering context. If a program object to be deleted has shader
        objects attached to it, those shader objects will be
        automatically detached but not deleted unless they have already
        been flagged for deletion by a previous call to
        <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>.
        A value of 0 for <parameter>program</parameter> will be silently
        ignored.</para>

        <para>To determine whether a program object has been flagged for
        deletion, call
        <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
        with arguments <parameter>program</parameter> and
        <constant>GL_DELETE_STATUS</constant>.</para>
    </refsect1>
    <refsect1 id="notes"><title>Notes</title>
        <para><function>glDeleteProgram</function> is available only if
        the GL version is 2.0 or greater.</para>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para><constant>GL_INVALID_VALUE</constant> is generated if
        <parameter>program</parameter> is not a value generated by
        OpenGL.</para>

        <para><constant>GL_INVALID_OPERATION</constant> is generated if
        <function>glDeleteProgram</function> is executed between the
        execution of
        <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
        and the corresponding execution of
        <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
    </refsect1>
    <refsect1 id="associatedgets"><title>Associated Gets</title>
        <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
        with argument <constant>GL_CURRENT_PROGRAM</constant></para>

        <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
        with arguments <parameter>program</parameter> and
        <constant>GL_DELETE_STATUS</constant></para>

        <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para><citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
        <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
        <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
            This material may be distributed subject to the terms and conditions set forth in
            the Open Publication License, v 1.0, 8 June 1999.
            <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
        </para>
    </refsect1>
</refentry>