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