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="glTexImage2DMultisample">\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>glTexImage2DMultisample</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glTexImage2DMultisample</refname>\r | |
17 | <refpurpose>establish the data storage, format, dimensions, and number of samples of a multisample texture's image</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glTexImage2DMultisample</function></funcdef>\r | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef>\r | |
24 | <paramdef>GLsizei <parameter>samples</parameter></paramdef>\r | |
25 | <paramdef>GLint <parameter>internalformat</parameter></paramdef>\r | |
26 | <paramdef>GLsizei <parameter>width</parameter></paramdef>\r | |
27 | <paramdef>GLsizei <parameter>height</parameter></paramdef>\r | |
28 | <paramdef>GLboolean <parameter>fixedsamplelocations</parameter></paramdef>\r | |
29 | </funcprototype>\r | |
30 | </funcsynopsis>\r | |
31 | </refsynopsisdiv>\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 target of the operation. <parameter>target</parameter> must be <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_PROXY_TEXTURE_2D_MULTISAMPLE</constant>.\r | |
39 | </para>\r | |
40 | </listitem>\r | |
41 | </varlistentry>\r | |
42 | <varlistentry>\r | |
43 | <term><parameter>samples</parameter></term>\r | |
44 | <listitem>\r | |
45 | <para>\r | |
46 | The number of samples in the multisample texture's image.\r | |
47 | </para>\r | |
48 | </listitem>\r | |
49 | </varlistentry>\r | |
50 | <varlistentry>\r | |
51 | <term><parameter>internalformat</parameter></term>\r | |
52 | <listitem>\r | |
53 | <para>\r | |
54 | The internal format to be used to store the multisample texture's image. <parameter>internalformat</parameter> must specify a color-renderable, depth-renderable, or stencil-renderable format.\r | |
55 | </para>\r | |
56 | </listitem>\r | |
57 | </varlistentry>\r | |
58 | <varlistentry>\r | |
59 | <term><parameter>width</parameter></term>\r | |
60 | <listitem>\r | |
61 | <para>\r | |
62 | The width of the multisample texture's image, in texels.\r | |
63 | </para>\r | |
64 | </listitem>\r | |
65 | </varlistentry>\r | |
66 | <varlistentry>\r | |
67 | <term><parameter>height</parameter></term>\r | |
68 | <listitem>\r | |
69 | <para>\r | |
70 | The height of the multisample texture's image, in texels.\r | |
71 | </para>\r | |
72 | </listitem>\r | |
73 | </varlistentry>\r | |
74 | <varlistentry>\r | |
75 | <term><parameter>fixedsamplelocations</parameter></term>\r | |
76 | <listitem>\r | |
77 | <para>\r | |
78 | Specifies whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not\r | |
79 | depend on the internal format or size of the image.\r | |
80 | </para>\r | |
81 | </listitem>\r | |
82 | </varlistentry>\r | |
83 | </variablelist>\r | |
84 | </refsect1>\r | |
85 | <refsect1 id="description"><title>Description</title>\r | |
86 | <para>\r | |
87 | <function>glTexImage2DMultisample</function> establishes the data storage, format, dimensions and number of samples of a multisample texture's image.\r | |
88 | </para>\r | |
89 | <para>\r | |
90 | <parameter>target</parameter> must be <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_PROXY_TEXTURE_2D_MULTISAMPLE</constant>.\r | |
91 | <parameter>width</parameter> and <parameter>height</parameter> are the dimensions in texels of the texture, and must be in the range zero\r | |
92 | to <constant>GL_MAX_TEXTURE_SIZE</constant> - 1. <parameter>samples</parameter> specifies the number of samples in the image and must be\r | |
93 | in the range zero to <constant>GL_MAX_SAMPLES</constant> - 1.\r | |
94 | </para>\r | |
95 | <para>\r | |
96 | <parameter>internalformat</parameter> must be a color-renderable, depth-renderable, or stencil-renderable format.\r | |
97 | </para>\r | |
98 | <para>\r | |
99 | If <parameter>fixedsamplelocations</parameter> is <constant>GL_TRUE</constant>, the image will use identical sample locations and the same\r | |
100 | number of samples for all texels in the image, and the sample locations will not depend on the internal format or size of the image.\r | |
101 | </para>\r | |
102 | <para>\r | |
103 | When a multisample texture is accessed in a shader, the access takes one vector of integers describing which texel to fetch and an integer\r | |
104 | corresponding to the sample numbers describing which sample within the texel to fetch. No standard sampling instructions are allowed on the\r | |
105 | multisample texture targets.\r | |
106 | </para>\r | |
107 | </refsect1>\r | |
108 | <refsect1 id="notes"><title>Notes</title>\r | |
109 | <para>\r | |
110 | <function>glTexImage2DMultisample</function> is available only if the GL version is 3.2 or greater.\r | |
111 | </para>\r | |
112 | </refsect1>\r | |
113 | <refsect1 id="errors"><title>Errors</title>\r | |
114 | <para>\r | |
115 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is a depth- or stencil-renderable format and <parameter>samples</parameter>\r | |
116 | is greater than the value of <constant>GL_MAX_DEPTH_TEXTURE_SAMPLES</constant>.\r | |
117 | </para>\r | |
118 | <para>\r | |
119 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is a color-renderable format and <parameter>samples</parameter> is\r | |
120 | greater than the value of <constant>GL_MAX_COLOR_TEXTURE_SAMPLES</constant>.\r | |
121 | </para>\r | |
122 | <para>\r | |
123 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is a signed or unsigned integer format and <parameter>samples</parameter>\r | |
124 | is greater than the value of <constant>GL_MAX_INTEGER_SAMPLES</constant>.\r | |
125 | </para>\r | |
126 | <para>\r | |
127 | <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>width</parameter> or <parameter>height</parameter> negative or is greater than <constant>GL_MAX_TEXTURE_SIZE</constant>.\r | |
128 | </para>\r | |
129 | <para>\r | |
130 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>samples</parameter> is greater than <constant>GL_MAX_SAMPLES</constant>.\r | |
131 | </para>\r | |
132 | </refsect1>\r | |
133 | <refsect1 id="seealso"><title>See Also</title>\r | |
134 | <para>\r | |
135 | <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,\r | |
136 | <citerefentry><refentrytitle>glTexImage2DMultisample</refentrytitle></citerefentry>\r | |
137 | </para>\r | |
138 | </refsect1>\r | |
139 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
140 | <para>\r | |
141 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r | |
142 | This material may be distributed subject to the terms and conditions set forth in \r | |
143 | the Open Publication License, v 1.0, 8 June 1999.\r | |
144 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
145 | </para>\r | |
146 | </refsect1>\r | |
147 | </refentry>\r |