Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="glFramebufferTextureLayer">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2010</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>glFramebufferTextureLayer</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glFramebufferTextureLayer</refname>\r | |
17 | <refpurpose>attach a single layer of a texture to a framebuffer</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glFramebufferTextureLayer</function></funcdef>\r | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef>\r | |
24 | <paramdef>GLenum <parameter>attachment</parameter></paramdef>\r | |
25 | <paramdef>GLuint <parameter>texture</parameter></paramdef>\r | |
26 | <paramdef>GLint <parameter>level</parameter></paramdef>\r | |
27 | <paramdef>GLint <parameter>layer</parameter></paramdef>\r | |
28 | </funcprototype>\r | |
29 | </funcsynopsis>\r | |
30 | </refsynopsisdiv>\r | |
31 | <!-- eqn: ignoring delim $$ -->\r | |
32 | <refsect1 id="parameters"><title>Parameters</title>\r | |
33 | <variablelist>\r | |
34 | <varlistentry>\r | |
35 | <term><parameter>target</parameter></term>\r | |
36 | <listitem>\r | |
37 | <para>\r | |
38 | Specifies the framebuffer target. <parameter>target</parameter> must be <constant>GL_DRAW_FRAMEBUFFER</constant>,\r | |
39 | <constant>GL_READ_FRAMEBUFFER</constant>, or <constant>GL_FRAMEBUFFER</constant>. <constant>GL_FRAMEBUFFER</constant>\r | |
40 | is equivalent to <constant>GL_DRAW_FRAMEBUFFER</constant>.\r | |
41 | </para>\r | |
42 | </listitem>\r | |
43 | </varlistentry>\r | |
44 | <varlistentry>\r | |
45 | <term><parameter>attachment</parameter></term>\r | |
46 | <listitem>\r | |
47 | <para>\r | |
48 | Specifies the attachment point of the framebuffer. <parameter>attachment</parameter> must be\r | |
49 | <constant>GL_COLOR_ATTACHMENT<emphasis>i</emphasis></constant>, <constant>GL_DEPTH_ATTACHMENT</constant>,\r | |
c7b31271 | 50 | <constant>GL_STENCIL_ATTACHMENT</constant> or <constant>GL_DEPTH_STENCIL_ATTACHMENT</constant>.\r |
7faf1d71 AW |
51 | </para>\r |
52 | </listitem>\r | |
53 | </varlistentry>\r | |
54 | <varlistentry>\r | |
55 | <term><parameter>texture</parameter></term>\r | |
56 | <listitem>\r | |
57 | <para>\r | |
58 | Specifies the texture object to attach to the framebuffer attachment point named by <parameter>attachment</parameter>.\r | |
59 | </para>\r | |
60 | </listitem>\r | |
61 | </varlistentry>\r | |
62 | <varlistentry>\r | |
63 | <term><parameter>level</parameter></term>\r | |
64 | <listitem>\r | |
65 | <para>\r | |
66 | Specifies the mipmap level of <parameter>texture</parameter> to attach.\r | |
67 | </para>\r | |
68 | </listitem>\r | |
69 | </varlistentry>\r | |
70 | <varlistentry>\r | |
71 | <term><parameter>layer</parameter></term>\r | |
72 | <listitem>\r | |
73 | <para>\r | |
74 | Specifies the layer of <parameter>texture</parameter> to attach.\r | |
75 | </para>\r | |
76 | </listitem>\r | |
77 | </varlistentry>\r | |
78 | </variablelist>\r | |
79 | </refsect1>\r | |
80 | <refsect1 id="description"><title>Description</title>\r | |
81 | <para>\r | |
82 | <function>glFramebufferTextureLayer</function> operates like <citerefentry><refentrytitle>glFramebufferTexture</refentrytitle></citerefentry>,\r | |
83 | except that only a single layer of the texture level, given by <parameter>layer</parameter>, is attached to the attachment point.\r | |
84 | If <parameter>texture</parameter> is not zero, <parameter>layer</parameter> must be greater than or equal to zero.\r | |
85 | <parameter>texture</parameter> must either be zero or the name of an existing three-dimensional texture, one- or two-dimensional array texture,\r | |
86 | or multisample array texture.\r | |
87 | </para>\r | |
88 | </refsect1>\r | |
89 | <refsect1 id="notes"><title>Notes</title>\r | |
90 | <para>\r | |
91 | <function>glFramebufferTextureLayer</function> is available only if the GL version is 3.2 or greater.\r | |
92 | </para>\r | |
93 | </refsect1>\r | |
94 | <refsect1 id="errors"><title>Errors</title>\r | |
95 | <para>\r | |
96 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the accepted tokens.\r | |
97 | </para>\r | |
98 | <para>\r | |
99 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>attachment</parameter> is not one of the accepted tokens.\r | |
100 | </para>\r | |
101 | <para>\r | |
102 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not zero or the name of an existing\r | |
103 | texture object.\r | |
104 | </para>\r | |
105 | <para>\r | |
106 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not zero and <parameter>layer</parameter>\r | |
107 | is negative.\r | |
108 | </para>\r | |
109 | <para>\r | |
110 | <constant>GL_INVALID_OPERATION</constant> is generated if zero is bound to <parameter>target</parameter>.\r | |
111 | </para>\r | |
112 | <para>\r | |
113 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is not zero or the name of an existing cube map texture.\r | |
114 | </para>\r | |
115 | </refsect1>\r | |
116 | <refsect1 id="seealso"><title>See Also</title>\r | |
117 | <para>\r | |
118 | <citerefentry><refentrytitle>glGenFramebuffers</refentrytitle></citerefentry>,\r | |
119 | <citerefentry><refentrytitle>glBindFramebuffer</refentrytitle></citerefentry>,\r | |
120 | <citerefentry><refentrytitle>glGenRenderbuffers</refentrytitle></citerefentry>,\r | |
121 | <citerefentry><refentrytitle>glFramebufferTexture</refentrytitle></citerefentry>,\r | |
122 | <citerefentry><refentrytitle>glFramebufferTextureFace</refentrytitle></citerefentry>\r | |
123 | </para>\r | |
124 | </refsect1>\r | |
125 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
126 | <para>\r | |
127 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r | |
128 | This material may be distributed subject to the terms and conditions set forth in \r | |
129 | the Open Publication License, v 1.0, 8 June 1999.\r | |
130 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
131 | </para>\r | |
132 | </refsect1>\r | |
133 | </refentry>\r |