Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glFramebufferTextureLayer</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glFramebufferTextureLayer</refname> | |
17 | <refpurpose>attach a single layer of a texture to a framebuffer</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
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> | |
28 | </funcprototype> | |
29 | </funcsynopsis> | |
30 | </refsynopsisdiv> | |
31 | <!-- eqn: ignoring delim $$ --> | |
32 | <refsect1 id="parameters"><title>Parameters</title> | |
33 | <variablelist> | |
34 | <varlistentry> | |
35 | <term><parameter>target</parameter></term> | |
36 | <listitem> | |
37 | <para> | |
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>. | |
41 | </para> | |
42 | </listitem> | |
43 | </varlistentry> | |
44 | <varlistentry> | |
45 | <term><parameter>attachment</parameter></term> | |
46 | <listitem> | |
47 | <para> | |
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>, | |
c7b31271 | 50 | <constant>GL_STENCIL_ATTACHMENT</constant> or <constant>GL_DEPTH_STENCIL_ATTACHMENT</constant>. |
7faf1d71 AW |
51 | </para> |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><parameter>texture</parameter></term> | |
56 | <listitem> | |
57 | <para> | |
58 | Specifies the texture object to attach to the framebuffer attachment point named by <parameter>attachment</parameter>. | |
59 | </para> | |
60 | </listitem> | |
61 | </varlistentry> | |
62 | <varlistentry> | |
63 | <term><parameter>level</parameter></term> | |
64 | <listitem> | |
65 | <para> | |
66 | Specifies the mipmap level of <parameter>texture</parameter> to attach. | |
67 | </para> | |
68 | </listitem> | |
69 | </varlistentry> | |
70 | <varlistentry> | |
71 | <term><parameter>layer</parameter></term> | |
72 | <listitem> | |
73 | <para> | |
74 | Specifies the layer of <parameter>texture</parameter> to attach. | |
75 | </para> | |
76 | </listitem> | |
77 | </varlistentry> | |
78 | </variablelist> | |
79 | </refsect1> | |
80 | <refsect1 id="description"><title>Description</title> | |
81 | <para> | |
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. | |
87 | </para> | |
88 | </refsect1> | |
89 | <refsect1 id="errors"><title>Errors</title> | |
90 | <para> | |
91 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the accepted tokens. | |
92 | </para> | |
93 | <para> | |
94 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>attachment</parameter> is not one of the accepted tokens. | |
95 | </para> | |
96 | <para> | |
97 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not zero or the name of an existing | |
98 | texture object. | |
99 | </para> | |
100 | <para> | |
101 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not zero and <parameter>layer</parameter> | |
102 | is negative. | |
103 | </para> | |
104 | <para> | |
105 | <constant>GL_INVALID_OPERATION</constant> is generated if zero is bound to <parameter>target</parameter>. | |
106 | </para> | |
107 | <para> | |
108 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is not zero or the name of an existing cube map texture. | |
109 | </para> | |
110 | </refsect1> | |
111 | <refsect1 id="seealso"><title>See Also</title> | |
112 | <para> | |
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> | |
118 | </para> | |
119 | </refsect1> | |
120 | <refsect1 id="Copyright"><title>Copyright</title> | |
121 | <para> | |
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>. | |
126 | </para> | |
127 | </refsect1> | |
128 | </refentry> |