<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>

<!-- Converted by db4-upgrade version 1.1 -->

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glInvalidateFramebuffer">
    <info>
        <copyright>
            <year>2012-2014</year>
            <holder>Khronos Group</holder>
        </copyright>
    </info>
    <refmeta>
        <refentrytitle>glInvalidateFramebuffer</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glInvalidateFramebuffer</refname>
        <refpurpose>Invalidate the contents of attachments within a framebuffer</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glInvalidateFramebuffer</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLsizei <parameter>numAttachments</parameter></paramdef>
                <paramdef>const GLenum *<parameter>attachments</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 xml:id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>target</parameter></term>
            <listitem>
                <para>
                    Specifies the target of the invalidate operation. Must be <constant>GL_FRAMEBUFFER</constant>.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>numAttachments</parameter></term>
            <listitem>
                <para>
                    Specifies how many attachments are supplied in the <parameter>attachments</parameter> list.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>attachments</parameter></term>
            <listitem>
                <para>
                    A list of <parameter>numAttachments</parameter> attachments to invalidate.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="description"><title>Description</title>
        <para>
            <function>glInvalidateFramebuffer</function> signals to the GL
            that it need not preserve all pixels of a bound framebuffer
            object. <parameter>attachments</parameter> contains a list of
            <parameter>numAttachments</parameter> to be invalidated. If an
            attachment is specified that does not exist in the bound
            framebuffer, it is ignored.
        </para>
        <para>
            If a framebuffer object is bound, then
            <parameter>attachments</parameter> may contain
            <constant>GL_COLOR_ATTACHMENTi</constant>,
            <constant>GL_DEPTH_ATTACHMENT</constant>, 
            <constant>GL_STENCIL_ATTACHMENT</constant>, and/or
            <constant>GL_DEPTH_STENCIL_ATTACHMENT</constant>. If the
            framebuffer object is not complete,
            <function>glInvalidateFramebuffer</function> may be ignored.
        </para>
        <para>
            If the default framebuffer is bound, then
            <parameter>attachments</parameter> may contain
            <constant>GL_COLOR</constant>, identifying the color buffer;
            <constant>GL_DEPTH</constant>, identifying the depth buffer;
            and/or <constant>GL_STENCIL</constant>, identifying the stencil
            buffer.
        </para>
    </refsect1>
    <refsect1 xml:id="notes"><title>Notes</title>
        <para>
            The intention of this function is to provide a hint to the GL
            implementation that there is no longer a need to preserve the
            contents of particular attachments of a framebuffer object, or
            the default framebuffer. It is possible, for example, to signal
            the intention that depth and or stencil data is no longer needed
            at the end of a scene, or that multisample color buffer data is
            no longer needed after a resolve through
            <citerefentry><refentrytitle>glBlitFramebuffer</refentrytitle></citerefentry>.
        </para>
    </refsect1>

    <refsect1 xml:id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_FRAMEBUFFER</constant>.
        </para>
        <para>
            <constant>GL_INVALID_OPERATION</constant> is generated if
            <parameter>attachments</parameter> contains
            <constant>GL_COLOR_ATTACHMENTm</constant> and m is greater than
            or equal to the value of
            <constant>GL_MAX_COLOR_ATTACHMENTS</constant>.
        </para>
    </refsect1>
    <refsect1 xml:id="versions">
        <title>API Version Support</title>
        <informaltable>
            <tgroup cols="3" align="left">
                <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
                <tbody>
                    <row>
                        <entry>glInvalidateFramebuffer</entry>
                        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='es30']/*)"/>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
    </refsect1>
    <refsect1 xml:id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glBindFramebuffer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glBlitFramebuffer</refentrytitle></citerefentry>
            <citerefentry><refentrytitle>glFramebufferRenderbuffer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glFramebufferTexture2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glFramebufferTextureLayer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 xml:id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"/> 2014 Khronos Group.
            This material may be distributed subject to the terms and conditions set forth in
            the Open Publication License, v 1.0, 8 June 1999.
            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
        </para>
    </refsect1>
</refentry>
