92e776ad0981493ccdb2038bd201ecb41903e96f
[clinton/guile-figl.git] / upstream-man-pages / man3 / glGetSamplerParameter.xml
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="glGetSamplerParameter">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetSamplerParameter</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetSamplerParameter</refname>
17 <refpurpose>return sampler parameter values</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetSamplerParameterfv</function></funcdef>
23 <paramdef>GLuint <parameter>sampler</parameter></paramdef>
24 <paramdef>GLenum <parameter>pname</parameter></paramdef>
25 <paramdef>GLfloat * <parameter>params</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 <funcsynopsis>
29 <funcprototype>
30 <funcdef>void <function>glGetSamplerParameteriv</function></funcdef>
31 <paramdef>GLuint <parameter>sampler</parameter></paramdef>
32 <paramdef>GLenum <parameter>pname</parameter></paramdef>
33 <paramdef>GLint * <parameter>params</parameter></paramdef>
34 </funcprototype>
35 </funcsynopsis>
36 <funcsynopsis>
37 <funcprototype>
38 <funcdef>void <function>glGetSamplerParameterIiv</function></funcdef>
39 <paramdef>GLuint <parameter>sampler</parameter></paramdef>
40 <paramdef>GLenum <parameter>pname</parameter></paramdef>
41 <paramdef>GLint * <parameter>params</parameter></paramdef>
42 </funcprototype>
43 </funcsynopsis>
44 <funcsynopsis>
45 <funcprototype>
46 <funcdef>void <function>glGetSamplerParameterIuiv</function></funcdef>
47 <paramdef>GLuint <parameter>sampler</parameter></paramdef>
48 <paramdef>GLenum <parameter>pname</parameter></paramdef>
49 <paramdef>GLuint * <parameter>params</parameter></paramdef>
50 </funcprototype>
51 </funcsynopsis>
52 </refsynopsisdiv>
53 <!-- eqn: ignoring delim $$ -->
54 <refsect1 id="parameters"><title>Parameters</title>
55 <variablelist>
56 <varlistentry>
57 <term><parameter>sampler</parameter></term>
58 <listitem>
59 <para>
60 Specifies name of the sampler object from which to retrieve parameters.
61 </para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><parameter>pname</parameter></term>
66 <listitem>
67 <para>
68 Specifies the symbolic name of a sampler parameter.
69 <constant>GL_TEXTURE_MAG_FILTER</constant>,
70 <constant>GL_TEXTURE_MIN_FILTER</constant>,
71 <constant>GL_TEXTURE_MIN_LOD</constant>,
72 <constant>GL_TEXTURE_MAX_LOD</constant>,
73 <constant>GL_TEXTURE_LOD_BIAS</constant>,
74 <constant>GL_TEXTURE_WRAP_S</constant>,
75 <constant>GL_TEXTURE_WRAP_T</constant>,
76 <constant>GL_TEXTURE_WRAP_R</constant>,
77 <constant>GL_TEXTURE_BORDER_COLOR</constant>,
78 <constant>GL_TEXTURE_COMPARE_MODE</constant>, and
79 <constant>GL_TEXTURE_COMPARE_FUNC</constant>
80 are accepted.
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><parameter>params</parameter></term>
86 <listitem>
87 <para>
88 Returns the sampler parameters.
89 </para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </refsect1>
94 <refsect1 id="description"><title>Description</title>
95 <para>
96 <function>glGetSamplerParameter</function> returns in <parameter>params</parameter> the value or values of the sampler parameter
97 specified as <parameter>pname</parameter>.
98 <parameter>sampler</parameter> defines the target sampler, and must be the name of an existing sampler object, returned from a previous call
99 to <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>.
100 <parameter>pname</parameter> accepts the same symbols as <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>,
101 with the same interpretations:
102 </para>
103 <variablelist>
104 <varlistentry>
105 <term><constant>GL_TEXTURE_MAG_FILTER</constant></term>
106 <listitem>
107 <para>
108 Returns the single-valued texture magnification filter,
109 a symbolic constant. The initial value is <constant>GL_LINEAR</constant>.
110 </para>
111 </listitem>
112 </varlistentry>
113 <varlistentry>
114 <term><constant>GL_TEXTURE_MIN_FILTER</constant></term>
115 <listitem>
116 <para>
117 Returns the single-valued texture minification filter,
118 a symbolic constant. The initial value is <constant>GL_NEAREST_MIPMAP_LINEAR</constant>.
119 </para>
120 </listitem>
121 </varlistentry>
122 <varlistentry>
123 <term><constant>GL_TEXTURE_MIN_LOD</constant></term>
124 <listitem>
125 <para>
126 Returns the single-valued texture minimum level-of-detail value. The
127 initial value is
128 <inlineequation><mml:math>
129 <!-- eqn: -1000: -->
130 <mml:mn>-1000</mml:mn>
131 </mml:math></inlineequation>.
132 </para>
133 </listitem>
134 </varlistentry>
135 <varlistentry>
136 <term><constant>GL_TEXTURE_MAX_LOD</constant></term>
137 <listitem>
138 <para>
139 Returns the single-valued texture maximum level-of-detail value. The
140 initial value is 1000.
141 </para>
142 </listitem>
143 </varlistentry>
144 <varlistentry>
145 <term><constant>GL_TEXTURE_WRAP_S</constant></term>
146 <listitem>
147 <para>
148 Returns the single-valued wrapping function for texture coordinate
149 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>,
150 a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
151 </para>
152 </listitem>
153 </varlistentry>
154 <varlistentry>
155 <term><constant>GL_TEXTURE_WRAP_T</constant></term>
156 <listitem>
157 <para>
158 Returns the single-valued wrapping function for texture coordinate
159 <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>,
160 a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
161 </para>
162 </listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><constant>GL_TEXTURE_WRAP_R</constant></term>
166 <listitem>
167 <para>
168 Returns the single-valued wrapping function for texture coordinate
169 <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>,
170 a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
171 </para>
172 </listitem>
173 </varlistentry>
174 <varlistentry>
175 <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term>
176 <listitem>
177 <para>
178 Returns four integer or floating-point numbers that comprise the RGBA color
179 of the texture border.
180 Floating-point values are returned in the range
181 <inlineequation><mml:math>
182 <!-- eqn: [0,1]: -->
183 <mml:mfenced open="[" close="]">
184 <mml:mn>0</mml:mn>
185 <mml:mn>1</mml:mn>
186 </mml:mfenced>
187 </mml:math></inlineequation>.
188 Integer values are returned as a linear mapping of the internal floating-point
189 representation such that 1.0 maps to the most positive representable
190 integer and
191 <inlineequation><mml:math>
192 <!-- eqn: -1.0: -->
193 <mml:mn>-1.0</mml:mn>
194 </mml:math></inlineequation>
195 maps to the most negative representable
196 integer. The initial value is (0, 0, 0, 0).
197 </para>
198 </listitem>
199 </varlistentry>
200 <varlistentry>
201 <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term>
202 <listitem>
203 <para>
204 Returns a single-valued texture comparison mode, a symbolic constant. The
205 initial value is <constant>GL_NONE</constant>. See <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>.
206 </para>
207 </listitem>
208 </varlistentry>
209 <varlistentry>
210 <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term>
211 <listitem>
212 <para>
213 Returns a single-valued texture comparison function, a symbolic constant. The
214 initial value is <constant>GL_LEQUAL</constant>. See <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>.
215 </para>
216 </listitem>
217 </varlistentry>
218 </variablelist>
219 </refsect1>
220 <refsect1 id="notes"><title>Notes</title>
221 <para>
222 If an error is generated,
223 no change is made to the contents of <parameter>params</parameter>.
224 </para>
225 <para>
226 <function>glGetSamplerParameter</function> is available only if the GL version is 3.3 or higher.
227 </para>
228 </refsect1>
229 <refsect1 id="errors"><title>Errors</title>
230 <para>
231 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>sampler</parameter> is not the name of a sampler object returned from
232 a previous call to <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>.
233 </para>
234 <para>
235 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
236 </para>
237 </refsect1>
238 <refsect1 id="seealso"><title>See Also</title>
239 <para>
240 <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>,
241 <citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>,
242 <citerefentry><refentrytitle>glDeleteSamplers</refentrytitle></citerefentry>,
243 <citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>
244 </para>
245 </refsect1>
246 <refsect1 id="Copyright"><title>Copyright</title>
247 <para>
248 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
249 This material may be distributed subject to the terms and conditions set forth in
250 the Open Publication License, v 1.0, 8 June 1999.
251 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
252 </para>
253 </refsect1>
254 </refentry>