<!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="glBindFramebuffer">
    <info>
        <copyright>
            <year>2010-2014</year>
            <holder>Khronos Group</holder>
        </copyright>
    </info>
    <refmeta>
        <refentrytitle>glBindFramebuffer</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glBindFramebuffer</refname>
        <refpurpose>bind a framebuffer to a framebuffer target</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glBindFramebuffer</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLuint <parameter>framebuffer</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 xml:id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>target</parameter></term>
            <listitem>
                <para>
                    Specifies the framebuffer target of the binding operation.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>framebuffer</parameter></term>
            <listitem>
                <para>
                    Specifies the name of the framebuffer object to bind.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="description"><title>Description</title>
        <para>
            <function>glBindFramebuffer</function> binds the framebuffer object with name <parameter>framebuffer</parameter> to the framebuffer target specified
            by <parameter>target</parameter>. <parameter>target</parameter> must be either <constant>GL_DRAW_FRAMEBUFFER</constant>,
            <constant>GL_READ_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>. If a framebuffer object is bound to
            <constant>GL_DRAW_FRAMEBUFFER</constant> or <constant>GL_READ_FRAMEBUFFER</constant>, it becomes the target for
            rendering or readback operations, respectively, until it is deleted or another framebuffer is bound to the corresponding bind point.
            Calling <function>glBindFramebuffer</function> with <parameter>target</parameter> set to <constant>GL_FRAMEBUFFER</constant> binds
            <parameter>framebuffer</parameter> to both the read and draw framebuffer targets.
        </para>

        <para>
            <citerefentry><refentrytitle>glGenFramebuffers</refentrytitle></citerefentry> may be used to generate a set of unused framebuffer object names.
        </para>

        <para>
                        The storage, dimensions, allocation, and format of the images attached to the default framebuffer are managed entirely
                        by the window system. In order that access to the default framebuffer is not lost, it is treated as a framebuffer object with the name of zero.
            The default framebuffer is therefore rendered to and read from while zero is bound to the corresponding targets.
        </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_DRAW_FRAMEBUFFER</constant>,
            <constant>GL_READ_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</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>glBindFramebuffer</entry>
                        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='es20']/*)"/>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
    </refsect1>
    <refsect1 xml:id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glGenFramebuffers</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glDeleteFramebuffers</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glFramebufferRenderbuffer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glFramebufferTexture2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glFramebufferTextureLayer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glIsFramebuffer</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 xml:id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"/> 2010-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>
