| 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="glTexCoord"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>1991-2006</year> |
| 9 | <holder>Silicon Graphics, Inc.</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glTexCoord</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glTexCoord</refname> |
| 17 | <refpurpose>set the current texture coordinates</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glTexCoord1s</function></funcdef> |
| 23 | <paramdef>GLshort <parameter>s</parameter></paramdef> |
| 24 | </funcprototype> |
| 25 | </funcsynopsis> |
| 26 | <funcsynopsis> |
| 27 | <funcprototype> |
| 28 | <funcdef>void <function>glTexCoord1i</function></funcdef> |
| 29 | <paramdef>GLint <parameter>s</parameter></paramdef> |
| 30 | </funcprototype> |
| 31 | </funcsynopsis> |
| 32 | <funcsynopsis> |
| 33 | <funcprototype> |
| 34 | <funcdef>void <function>glTexCoord1f</function></funcdef> |
| 35 | <paramdef>GLfloat <parameter>s</parameter></paramdef> |
| 36 | </funcprototype> |
| 37 | </funcsynopsis> |
| 38 | <funcsynopsis> |
| 39 | <funcprototype> |
| 40 | <funcdef>void <function>glTexCoord1d</function></funcdef> |
| 41 | <paramdef>GLdouble <parameter>s</parameter></paramdef> |
| 42 | </funcprototype> |
| 43 | </funcsynopsis> |
| 44 | <funcsynopsis> |
| 45 | <funcprototype> |
| 46 | <funcdef>void <function>glTexCoord2s</function></funcdef> |
| 47 | <paramdef>GLshort <parameter>s</parameter></paramdef> |
| 48 | <paramdef>GLshort <parameter>t</parameter></paramdef> |
| 49 | </funcprototype> |
| 50 | </funcsynopsis> |
| 51 | <funcsynopsis> |
| 52 | <funcprototype> |
| 53 | <funcdef>void <function>glTexCoord2i</function></funcdef> |
| 54 | <paramdef>GLint <parameter>s</parameter></paramdef> |
| 55 | <paramdef>GLint <parameter>t</parameter></paramdef> |
| 56 | </funcprototype> |
| 57 | </funcsynopsis> |
| 58 | <funcsynopsis> |
| 59 | <funcprototype> |
| 60 | <funcdef>void <function>glTexCoord2f</function></funcdef> |
| 61 | <paramdef>GLfloat <parameter>s</parameter></paramdef> |
| 62 | <paramdef>GLfloat <parameter>t</parameter></paramdef> |
| 63 | </funcprototype> |
| 64 | </funcsynopsis> |
| 65 | <funcsynopsis> |
| 66 | <funcprototype> |
| 67 | <funcdef>void <function>glTexCoord2d</function></funcdef> |
| 68 | <paramdef>GLdouble <parameter>s</parameter></paramdef> |
| 69 | <paramdef>GLdouble <parameter>t</parameter></paramdef> |
| 70 | </funcprototype> |
| 71 | </funcsynopsis> |
| 72 | <funcsynopsis> |
| 73 | <funcprototype> |
| 74 | <funcdef>void <function>glTexCoord3s</function></funcdef> |
| 75 | <paramdef>GLshort <parameter>s</parameter></paramdef> |
| 76 | <paramdef>GLshort <parameter>t</parameter></paramdef> |
| 77 | <paramdef>GLshort <parameter>r</parameter></paramdef> |
| 78 | </funcprototype> |
| 79 | </funcsynopsis> |
| 80 | <funcsynopsis> |
| 81 | <funcprototype> |
| 82 | <funcdef>void <function>glTexCoord3i</function></funcdef> |
| 83 | <paramdef>GLint <parameter>s</parameter></paramdef> |
| 84 | <paramdef>GLint <parameter>t</parameter></paramdef> |
| 85 | <paramdef>GLint <parameter>r</parameter></paramdef> |
| 86 | </funcprototype> |
| 87 | </funcsynopsis> |
| 88 | <funcsynopsis> |
| 89 | <funcprototype> |
| 90 | <funcdef>void <function>glTexCoord3f</function></funcdef> |
| 91 | <paramdef>GLfloat <parameter>s</parameter></paramdef> |
| 92 | <paramdef>GLfloat <parameter>t</parameter></paramdef> |
| 93 | <paramdef>GLfloat <parameter>r</parameter></paramdef> |
| 94 | </funcprototype> |
| 95 | </funcsynopsis> |
| 96 | <funcsynopsis> |
| 97 | <funcprototype> |
| 98 | <funcdef>void <function>glTexCoord3d</function></funcdef> |
| 99 | <paramdef>GLdouble <parameter>s</parameter></paramdef> |
| 100 | <paramdef>GLdouble <parameter>t</parameter></paramdef> |
| 101 | <paramdef>GLdouble <parameter>r</parameter></paramdef> |
| 102 | </funcprototype> |
| 103 | </funcsynopsis> |
| 104 | <funcsynopsis> |
| 105 | <funcprototype> |
| 106 | <funcdef>void <function>glTexCoord4s</function></funcdef> |
| 107 | <paramdef>GLshort <parameter>s</parameter></paramdef> |
| 108 | <paramdef>GLshort <parameter>t</parameter></paramdef> |
| 109 | <paramdef>GLshort <parameter>r</parameter></paramdef> |
| 110 | <paramdef>GLshort <parameter>q</parameter></paramdef> |
| 111 | </funcprototype> |
| 112 | </funcsynopsis> |
| 113 | <funcsynopsis> |
| 114 | <funcprototype> |
| 115 | <funcdef>void <function>glTexCoord4i</function></funcdef> |
| 116 | <paramdef>GLint <parameter>s</parameter></paramdef> |
| 117 | <paramdef>GLint <parameter>t</parameter></paramdef> |
| 118 | <paramdef>GLint <parameter>r</parameter></paramdef> |
| 119 | <paramdef>GLint <parameter>q</parameter></paramdef> |
| 120 | </funcprototype> |
| 121 | </funcsynopsis> |
| 122 | <funcsynopsis> |
| 123 | <funcprototype> |
| 124 | <funcdef>void <function>glTexCoord4f</function></funcdef> |
| 125 | <paramdef>GLfloat <parameter>s</parameter></paramdef> |
| 126 | <paramdef>GLfloat <parameter>t</parameter></paramdef> |
| 127 | <paramdef>GLfloat <parameter>r</parameter></paramdef> |
| 128 | <paramdef>GLfloat <parameter>q</parameter></paramdef> |
| 129 | </funcprototype> |
| 130 | </funcsynopsis> |
| 131 | <funcsynopsis> |
| 132 | <funcprototype> |
| 133 | <funcdef>void <function>glTexCoord4d</function></funcdef> |
| 134 | <paramdef>GLdouble <parameter>s</parameter></paramdef> |
| 135 | <paramdef>GLdouble <parameter>t</parameter></paramdef> |
| 136 | <paramdef>GLdouble <parameter>r</parameter></paramdef> |
| 137 | <paramdef>GLdouble <parameter>q</parameter></paramdef> |
| 138 | </funcprototype> |
| 139 | </funcsynopsis> |
| 140 | </refsynopsisdiv> |
| 141 | <refsect1 id="parameters"><title>Parameters</title> |
| 142 | <variablelist> |
| 143 | <varlistentry> |
| 144 | <term><parameter>s</parameter></term> |
| 145 | <term><parameter>t</parameter></term> |
| 146 | <term><parameter>r</parameter></term> |
| 147 | <term><parameter>q</parameter></term> |
| 148 | <listitem> |
| 149 | <para> |
| 150 | Specify <emphasis>s</emphasis>, <emphasis>t</emphasis>, <emphasis>r</emphasis>, and <emphasis>q</emphasis> texture coordinates. |
| 151 | Not all parameters are present in all forms of the command. |
| 152 | </para> |
| 153 | </listitem> |
| 154 | </varlistentry> |
| 155 | </variablelist> |
| 156 | </refsect1> |
| 157 | <refsynopsisdiv><title>C Specification</title> |
| 158 | <funcsynopsis> |
| 159 | <funcprototype> |
| 160 | <funcdef>void <function>glTexCoord1sv</function></funcdef> |
| 161 | <paramdef>const GLshort * <parameter>v</parameter></paramdef> |
| 162 | </funcprototype> |
| 163 | </funcsynopsis> |
| 164 | <funcsynopsis> |
| 165 | <funcprototype> |
| 166 | <funcdef>void <function>glTexCoord1iv</function></funcdef> |
| 167 | <paramdef>const GLint * <parameter>v</parameter></paramdef> |
| 168 | </funcprototype> |
| 169 | </funcsynopsis> |
| 170 | <funcsynopsis> |
| 171 | <funcprototype> |
| 172 | <funcdef>void <function>glTexCoord1fv</function></funcdef> |
| 173 | <paramdef>const GLfloat * <parameter>v</parameter></paramdef> |
| 174 | </funcprototype> |
| 175 | </funcsynopsis> |
| 176 | <funcsynopsis> |
| 177 | <funcprototype> |
| 178 | <funcdef>void <function>glTexCoord1dv</function></funcdef> |
| 179 | <paramdef>const GLdouble * <parameter>v</parameter></paramdef> |
| 180 | </funcprototype> |
| 181 | </funcsynopsis> |
| 182 | <funcsynopsis> |
| 183 | <funcprototype> |
| 184 | <funcdef>void <function>glTexCoord2sv</function></funcdef> |
| 185 | <paramdef>const GLshort * <parameter>v</parameter></paramdef> |
| 186 | </funcprototype> |
| 187 | </funcsynopsis> |
| 188 | <funcsynopsis> |
| 189 | <funcprototype> |
| 190 | <funcdef>void <function>glTexCoord2iv</function></funcdef> |
| 191 | <paramdef>const GLint * <parameter>v</parameter></paramdef> |
| 192 | </funcprototype> |
| 193 | </funcsynopsis> |
| 194 | <funcsynopsis> |
| 195 | <funcprototype> |
| 196 | <funcdef>void <function>glTexCoord2fv</function></funcdef> |
| 197 | <paramdef>const GLfloat * <parameter>v</parameter></paramdef> |
| 198 | </funcprototype> |
| 199 | </funcsynopsis> |
| 200 | <funcsynopsis> |
| 201 | <funcprototype> |
| 202 | <funcdef>void <function>glTexCoord2dv</function></funcdef> |
| 203 | <paramdef>const GLdouble * <parameter>v</parameter></paramdef> |
| 204 | </funcprototype> |
| 205 | </funcsynopsis> |
| 206 | <funcsynopsis> |
| 207 | <funcprototype> |
| 208 | <funcdef>void <function>glTexCoord3sv</function></funcdef> |
| 209 | <paramdef>const GLshort * <parameter>v</parameter></paramdef> |
| 210 | </funcprototype> |
| 211 | </funcsynopsis> |
| 212 | <funcsynopsis> |
| 213 | <funcprototype> |
| 214 | <funcdef>void <function>glTexCoord3iv</function></funcdef> |
| 215 | <paramdef>const GLint * <parameter>v</parameter></paramdef> |
| 216 | </funcprototype> |
| 217 | </funcsynopsis> |
| 218 | <funcsynopsis> |
| 219 | <funcprototype> |
| 220 | <funcdef>void <function>glTexCoord3fv</function></funcdef> |
| 221 | <paramdef>const GLfloat * <parameter>v</parameter></paramdef> |
| 222 | </funcprototype> |
| 223 | </funcsynopsis> |
| 224 | <funcsynopsis> |
| 225 | <funcprototype> |
| 226 | <funcdef>void <function>glTexCoord3dv</function></funcdef> |
| 227 | <paramdef>const GLdouble * <parameter>v</parameter></paramdef> |
| 228 | </funcprototype> |
| 229 | </funcsynopsis> |
| 230 | <funcsynopsis> |
| 231 | <funcprototype> |
| 232 | <funcdef>void <function>glTexCoord4sv</function></funcdef> |
| 233 | <paramdef>const GLshort * <parameter>v</parameter></paramdef> |
| 234 | </funcprototype> |
| 235 | </funcsynopsis> |
| 236 | <funcsynopsis> |
| 237 | <funcprototype> |
| 238 | <funcdef>void <function>glTexCoord4iv</function></funcdef> |
| 239 | <paramdef>const GLint * <parameter>v</parameter></paramdef> |
| 240 | </funcprototype> |
| 241 | </funcsynopsis> |
| 242 | <funcsynopsis> |
| 243 | <funcprototype> |
| 244 | <funcdef>void <function>glTexCoord4fv</function></funcdef> |
| 245 | <paramdef>const GLfloat * <parameter>v</parameter></paramdef> |
| 246 | </funcprototype> |
| 247 | </funcsynopsis> |
| 248 | <funcsynopsis> |
| 249 | <funcprototype> |
| 250 | <funcdef>void <function>glTexCoord4dv</function></funcdef> |
| 251 | <paramdef>const GLdouble * <parameter>v</parameter></paramdef> |
| 252 | </funcprototype> |
| 253 | </funcsynopsis> |
| 254 | </refsynopsisdiv> |
| 255 | <refsect1 id="parameters2"><title>Parameters</title> |
| 256 | <variablelist> |
| 257 | <varlistentry> |
| 258 | <term><parameter>v</parameter></term> |
| 259 | <listitem> |
| 260 | <para> |
| 261 | Specifies a pointer to an array of one, two, three, or four elements, |
| 262 | which in turn specify the |
| 263 | <emphasis>s</emphasis>, |
| 264 | <emphasis>t</emphasis>, |
| 265 | <emphasis>r</emphasis>, and |
| 266 | <emphasis>q</emphasis> texture coordinates. |
| 267 | </para> |
| 268 | </listitem> |
| 269 | </varlistentry> |
| 270 | </variablelist> |
| 271 | </refsect1> |
| 272 | <refsect1 id="description"><title>Description</title> |
| 273 | <para> |
| 274 | <function>glTexCoord</function> specifies texture coordinates in |
| 275 | one, |
| 276 | two, |
| 277 | three, or |
| 278 | four dimensions. |
| 279 | <function>glTexCoord1</function> sets the current texture coordinates to |
| 280 | <inlineequation><mml:math> |
| 281 | <!-- eqn: (s, 0, 0, 1):--> |
| 282 | <mml:mfenced open="(" close=")"> |
| 283 | <mml:mi mathvariant="italic">s</mml:mi> |
| 284 | <mml:mn>0</mml:mn> |
| 285 | <mml:mn>0</mml:mn> |
| 286 | <mml:mn>1</mml:mn> |
| 287 | </mml:mfenced> |
| 288 | </mml:math></inlineequation>; |
| 289 | a call to |
| 290 | <function>glTexCoord2</function> sets them to |
| 291 | <inlineequation><mml:math> |
| 292 | <!-- eqn: (s, t, 0, 1):--> |
| 293 | <mml:mfenced open="(" close=")"> |
| 294 | <mml:mi mathvariant="italic">s</mml:mi> |
| 295 | <mml:mi mathvariant="italic">t</mml:mi> |
| 296 | <mml:mn>0</mml:mn> |
| 297 | <mml:mn>1</mml:mn> |
| 298 | </mml:mfenced> |
| 299 | </mml:math></inlineequation>. |
| 300 | Similarly, <function>glTexCoord3</function> specifies the texture coordinates as |
| 301 | <inlineequation><mml:math> |
| 302 | <!-- eqn: (s, t, r, 1):--> |
| 303 | <mml:mfenced open="(" close=")"> |
| 304 | <mml:mi mathvariant="italic">s</mml:mi> |
| 305 | <mml:mi mathvariant="italic">t</mml:mi> |
| 306 | <mml:mi mathvariant="italic">r</mml:mi> |
| 307 | <mml:mn>1</mml:mn> |
| 308 | </mml:mfenced> |
| 309 | </mml:math></inlineequation>, |
| 310 | and |
| 311 | <function>glTexCoord4</function> defines all four components explicitly as |
| 312 | <inlineequation><mml:math> |
| 313 | <!-- eqn: (s, t, r, q):--> |
| 314 | <mml:mfenced open="(" close=")"> |
| 315 | <mml:mi mathvariant="italic">s</mml:mi> |
| 316 | <mml:mi mathvariant="italic">t</mml:mi> |
| 317 | <mml:mi mathvariant="italic">r</mml:mi> |
| 318 | <mml:mi mathvariant="italic">q</mml:mi> |
| 319 | </mml:mfenced> |
| 320 | </mml:math></inlineequation>. |
| 321 | </para> |
| 322 | <para> |
| 323 | The current texture coordinates are part of the data |
| 324 | that is associated with each vertex and with the current |
| 325 | raster position. |
| 326 | Initially, the values for |
| 327 | <emphasis>s</emphasis>, |
| 328 | <emphasis>t</emphasis>, |
| 329 | <emphasis>r</emphasis>, and |
| 330 | <emphasis>q</emphasis> |
| 331 | are (0, 0, 0, 1). |
| 332 | </para> |
| 333 | <para> |
| 334 | </para> |
| 335 | </refsect1> |
| 336 | <refsect1 id="notes"><title>Notes</title> |
| 337 | <para> |
| 338 | The current texture coordinates can be updated at any time. |
| 339 | In particular, |
| 340 | <function>glTexCoord</function> can be called between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding |
| 341 | call to <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
| 342 | </para> |
| 343 | <para> |
| 344 | When the <code>ARB_imaging</code> extension is supported, <function>glTexCoord</function> always |
| 345 | updates texture unit <constant>GL_TEXTURE0</constant>. |
| 346 | </para> |
| 347 | </refsect1> |
| 348 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 349 | <para> |
| 350 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_CURRENT_TEXTURE_COORDS</constant> |
| 351 | </para> |
| 352 | </refsect1> |
| 353 | <refsect1 id="seealso"><title>See Also</title> |
| 354 | <para> |
| 355 | <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>, |
| 356 | <function>glTexCoordPointer</function>, |
| 357 | <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry> |
| 358 | </para> |
| 359 | </refsect1> |
| 360 | <refsect1 id="Copyright"><title>Copyright</title> |
| 361 | <para> |
| 362 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
| 363 | Silicon Graphics, Inc. This document is licensed under the SGI |
| 364 | Free Software B License. For details, see |
| 365 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
| 366 | </para> |
| 367 | </refsect1> |
| 368 | </refentry> |