update upstream sources
[clinton/guile-figl.git] / upstream-doc / man4 / xhtml / glTexImage2DMultisample.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glTexImage2DMultisample - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glTexImage2DMultisample"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glTexImage2DMultisample — establish the data storage, format, dimensions, and number of samples of a multisample texture's image</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glTexImage2DMultisample</b>(</code></td><td>GLenum  </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">samples</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">internalformat</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">height</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">fixedsamplelocations</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
5 Specifies the target of the operation. <em class="parameter"><code>target</code></em> must be <code class="constant">GL_TEXTURE_2D_MULTISAMPLE</code> or <code class="constant">GL_PROXY_TEXTURE_2D_MULTISAMPLE</code>.
6 </p></dd><dt><span class="term"><em class="parameter"><code>samples</code></em></span></dt><dd><p>
7 The number of samples in the multisample texture's image.
8 </p></dd><dt><span class="term"><em class="parameter"><code>internalformat</code></em></span></dt><dd><p>
9 The internal format to be used to store the multisample texture's image. <em class="parameter"><code>internalformat</code></em> must specify a color-renderable, depth-renderable, or stencil-renderable format.
10 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
11 The width of the multisample texture's image, in texels.
12 </p></dd><dt><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p>
13 The height of the multisample texture's image, in texels.
14 </p></dd><dt><span class="term"><em class="parameter"><code>fixedsamplelocations</code></em></span></dt><dd><p>
15 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
16 depend on the internal format or size of the image.
17 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
18 <code class="function">glTexImage2DMultisample</code> establishes the data storage, format, dimensions and number of samples of a multisample texture's image.
19 </p><p>
20 <em class="parameter"><code>target</code></em> must be <code class="constant">GL_TEXTURE_2D_MULTISAMPLE</code> or <code class="constant">GL_PROXY_TEXTURE_2D_MULTISAMPLE</code>.
21 <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are the dimensions in texels of the texture, and must be in the range zero
22 to <code class="constant">GL_MAX_TEXTURE_SIZE</code> - 1. <em class="parameter"><code>samples</code></em> specifies the number of samples in the image and must be
23 in the range zero to <code class="constant">GL_MAX_SAMPLES</code> - 1.
24 </p><p>
25 <em class="parameter"><code>internalformat</code></em> must be a color-renderable, depth-renderable, or stencil-renderable format.
26 </p><p>
27 If <em class="parameter"><code>fixedsamplelocations</code></em> is <code class="constant">GL_TRUE</code>, the image will use identical sample locations and the same
28 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.
29 </p><p>
30 When a multisample texture is accessed in a shader, the access takes one vector of integers describing which texel to fetch and an integer
31 corresponding to the sample numbers describing which sample within the texel to fetch. No standard sampling instructions are allowed on the
32 multisample texture targets.
33 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
34 <code class="function">glTexImage2DMultisample</code> is available only if the GL version is 3.2 or greater.
35 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
36 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalformat</code></em> is a depth- or stencil-renderable format and <em class="parameter"><code>samples</code></em>
37 is greater than the value of <code class="constant">GL_MAX_DEPTH_TEXTURE_SAMPLES</code>.
38 </p><p>
39 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalformat</code></em> is a color-renderable format and <em class="parameter"><code>samples</code></em> is
40 greater than the value of <code class="constant">GL_MAX_COLOR_TEXTURE_SAMPLES</code>.
41 </p><p>
42 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalformat</code></em> is a signed or unsigned integer format and <em class="parameter"><code>samples</code></em>
43 is greater than the value of <code class="constant">GL_MAX_INTEGER_SAMPLES</code>.
44 </p><p>
45 <code class="constant">GL_INVALID_VALUE</code> is generated if either <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> negative or is greater than <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
46 </p><p>
47 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>samples</code></em> is greater than <code class="constant">GL_MAX_SAMPLES</code>.
48 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
49 <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
50 <a href="glTexImage2DMultisample.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2DMultisample</span></span></a>
51 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
52 Copyright <span class="trademark"></span>© 2010-2013 Khronos Group.
53 This material may be distributed subject to the terms and conditions set forth in
54 the Open Publication License, v 1.0, 8 June 1999.
55 <a href="http://opencontent.org/openpub/" target="_top">http://opencontent.org/openpub/</a>.
56 </p></div></div></body></html>