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