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=
"glFramebufferTextureLayer">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glFramebufferTextureLayer
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glFramebufferTextureLayer
</refname>
17 <refpurpose>attach a single layer of a texture to a framebuffer
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glFramebufferTextureLayer
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLenum
<parameter>attachment
</parameter></paramdef>
25 <paramdef>GLuint
<parameter>texture
</parameter></paramdef>
26 <paramdef>GLint
<parameter>level
</parameter></paramdef>
27 <paramdef>GLint
<parameter>layer
</parameter></paramdef>
31 <!-- eqn: ignoring delim $$ -->
32 <refsect1 id=
"parameters"><title>Parameters
</title>
35 <term><parameter>target
</parameter></term>
38 Specifies the framebuffer target.
<parameter>target
</parameter> must be
<constant>GL_DRAW_FRAMEBUFFER
</constant>,
39 <constant>GL_READ_FRAMEBUFFER
</constant>, or
<constant>GL_FRAMEBUFFER
</constant>.
<constant>GL_FRAMEBUFFER
</constant>
40 is equivalent to
<constant>GL_DRAW_FRAMEBUFFER
</constant>.
45 <term><parameter>attachment
</parameter></term>
48 Specifies the attachment point of the framebuffer.
<parameter>attachment
</parameter> must be
49 <constant>GL_COLOR_ATTACHMENT
<emphasis>i
</emphasis></constant>,
<constant>GL_DEPTH_ATTACHMENT
</constant>,
50 <constant>GL_STENCIL_ATTACHMENT
</constant> or
<constant>GL_DEPTH_STENCIL_ATTACHMMENT
</constant>.
55 <term><parameter>texture
</parameter></term>
58 Specifies the texture object to attach to the framebuffer attachment point named by
<parameter>attachment
</parameter>.
63 <term><parameter>level
</parameter></term>
66 Specifies the mipmap level of
<parameter>texture
</parameter> to attach.
71 <term><parameter>layer
</parameter></term>
74 Specifies the layer of
<parameter>texture
</parameter> to attach.
80 <refsect1 id=
"description"><title>Description
</title>
82 <function>glFramebufferTextureLayer
</function> operates like
<citerefentry><refentrytitle>glFramebufferTexture
</refentrytitle></citerefentry>,
83 except that only a single layer of the texture level, given by
<parameter>layer
</parameter>, is attached to the attachment point.
84 If
<parameter>texture
</parameter> is not zero,
<parameter>layer
</parameter> must be greater than or equal to zero.
85 <parameter>texture
</parameter> must either be zero or the name of an existing three-dimensional texture, one- or two-dimensional array texture,
86 or multisample array texture.
89 <refsect1 id=
"errors"><title>Errors
</title>
91 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not one of the accepted tokens.
94 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>attachment
</parameter> is not one of the accepted tokens.
97 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>texture
</parameter> is not zero or the name of an existing
101 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>texture
</parameter> is not zero and
<parameter>layer
</parameter>
105 <constant>GL_INVALID_OPERATION
</constant> is generated if zero is bound to
<parameter>target
</parameter>.
108 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>texture
</parameter> is not zero or the name of an existing cube map texture.
111 <refsect1 id=
"seealso"><title>See Also
</title>
113 <citerefentry><refentrytitle>glGenFramebuffers
</refentrytitle></citerefentry>,
114 <citerefentry><refentrytitle>glBindFramebuffer
</refentrytitle></citerefentry>,
115 <citerefentry><refentrytitle>glGenRenderbuffers
</refentrytitle></citerefentry>,
116 <citerefentry><refentrytitle>glFramebufferTexture
</refentrytitle></citerefentry>,
117 <citerefentry><refentrytitle>glFramebufferTextureFace
</refentrytitle></citerefentry>
120 <refsect1 id=
"Copyright"><title>Copyright
</title>
122 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
123 This material may be distributed subject to the terms and conditions set forth in
124 the Open Publication License, v
1.0,
8 June
1999.
125 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.