rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glBindSampler.xml
CommitLineData
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="glBindSampler">\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>glBindSampler</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glBindSampler</refname>\r
17 <refpurpose>bind a named sampler to a texturing target</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glBindSampler</function></funcdef>\r
23 <paramdef>GLuint <parameter>unit</parameter></paramdef>\r
24 <paramdef>GLuint <parameter>sampler</parameter></paramdef>\r
25 </funcprototype>\r
26 </funcsynopsis>\r
27 </refsynopsisdiv>\r
28 <refsect1 id="parameters"><title>Parameters</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term><parameter>unit</parameter></term>\r
32 <listitem>\r
33 <para>\r
34 Specifies the index of the texture unit to which the sampler is bound.\r
35 </para>\r
36 </listitem>\r
37 </varlistentry>\r
38 <varlistentry>\r
39 <term><parameter>sampler</parameter></term>\r
40 <listitem>\r
41 <para>\r
42 Specifies the name of a sampler.\r
43 </para>\r
44 </listitem>\r
45 </varlistentry>\r
46 </variablelist>\r
47 </refsect1>\r
48 <refsect1 id="description"><title>Description</title>\r
49 <para>\r
50 <function>glBindSampler</function> binds <parameter>sampler</parameter> to the texture unit at index <parameter>unit</parameter>.\r
51 <parameter>sampler</parameter> must be zero or the name of a sampler object previously returned from a call to\r
52 <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>. <parameter>unit</parameter> must be less than the value\r
53 of <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant>.\r
54 </para>\r
55 <para>\r
56 When a sampler object is bound to a texture unit, its state supersedes that of\r
57 the texture object bound to that texture unit. If the sampler name zero is bound to\r
58 a texture unit, the currently bound texture's sampler state becomes active. A single\r
59 sampler object may be bound to multiple texture units simultaneously.\r
60 </para>\r
61 </refsect1>\r
62 <refsect1 id="notes"><title>Notes</title>\r
63 <para>\r
64 <function>glBindSampler</function> is available only if the GL version is 3.3 or higher.\r
65 </para>\r
66 </refsect1>\r
67 <refsect1 id="errors"><title>Errors</title>\r
68 <para>\r
69 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>unit</parameter> is greater than or equal to the value of\r
70 <constant>GL_MAX_COMBIED_TEXTURE_IMAGE_UNITS</constant>.\r
71 </para>\r
72 <para>\r
73 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>sampler</parameter> is not zero or a name previously\r
74 returned from a call to <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>, or if such a name has\r
75 been deleted by a call to <citerefentry><refentrytitle>glDeleteSamplers</refentrytitle></citerefentry>.\r
76 </para>\r
77 </refsect1>\r
78 <refsect1 id="associatedgets"><title>Associated Gets</title>\r
79 <para>\r
80 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SAMPLER_BINDING</constant>\r
81 </para>\r
82 </refsect1>\r
83 <refsect1 id="seealso"><title>See Also</title>\r
84 <para>\r
85 <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>,\r
86 <citerefentry><refentrytitle>glDeleteSamplers</refentrytitle></citerefentry>,\r
87 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,\r
88 <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>,\r
89 <citerefentry><refentrytitle>glGetSamplerParameter</refentrytitle></citerefentry>,\r
90 <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,\r
91 <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,\r
92 <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>\r
93 </para>\r
94 </refsect1>\r
95 <refsect1 id="Copyright"><title>Copyright</title>\r
96 <para>\r
97 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
98 This material may be distributed subject to the terms and conditions set forth in \r
99 the Open Publication License, v 1.0, 8 June 1999.\r
100 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
101 </para>\r
102 </refsect1>\r
103</refentry>\r