If <parameter>textarget</parameter> is <constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>,
or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>, then <parameter>level</parameter> must be zero. If <parameter>textarget</parameter>
is <constant>GL_TEXTURE_3D</constant>, then level must be greater than or equal to zero and less than or equal to log<subscript>2</subscript>
of the value of <constant>GL_MAX_3D_TEXTURE_SIZE</constant>. If <parameter>textarget</parameter> is one of <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
<constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>, or <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, then <parameter>level</parameter> must be greater
than or equal to zero and less than or equal to log<subscript>2</subscript> of the value of <constant>GL_MAX_CUBE_MAP_TEXTURE_SIZE</constant>. For all other
values of <parameter>textarget</parameter>, <parameter>level</parameter> must be greater than or equal to zero and no larger than log<subscript>2</subscript>
of the value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
</para>
<para>
<parameter>layer</parameter> specifies the layer of a 2-dimensional image within a 3-dimensional texture.
</para>
<para>
For <function>glFramebufferTexture1D</function>, if <parameter>texture</parameter> is not zero, then <parameter>textarget</parameter> must
be <constant>GL_TEXTURE_1D</constant>. For <function>glFramebufferTexture2D</function>, if <parameter>texture</parameter> is not zero,
<parameter>textarget</parameter> must be one of <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_RECTANGLE</constant>,
<constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>, <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>, <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
<constant>GL_TEXTURE_2D_MULTISAMPLE</constant>. For <function>glFramebufferTexture3D</function>, if <parameter>texture</parameter> is
not zero, then <parameter>textarget</parameter> must be <constant>GL_TEXTURE_3D</constant>.
</para>
</refsect1>
<refsect1id="notes"><title>Notes</title>
<para>
<function>glFramebufferTexture</function> is available only if the GL version is 3.2 or greater.
</para>
</refsect1>
<refsect1id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the accepted tokens.
</para>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>renderbuffertarget</parameter> is not <constant>GL_RENDERBUFFER</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if zero is bound to <parameter>target</parameter>.