<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glEvalCoord</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="&#xA;      PyOpenGL 2.0.1.04 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glEnableClientState.3G.xml" title="glEnableClientState"/><link rel="next" href="glEvalMesh.3G.xml" title="glEvalMesh"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glEvalCoord</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glEnableClientState.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glEvalMesh.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glEvalCoord.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glEvalCoord.3G-name"/><h2>Name</h2><p>glEvalCoord1d, glEvalCoord1f, glEvalCoord2d, glEvalCoord2f, glEvalCoord1dv, glEvalCoord1fv, glEvalCoord2dv, glEvalCoord2fv &#8212; evaluate enabled one-dimensional and two-dimensional maps</p></div><div class="refsynopsisdiv"><a name="glEvalCoord.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glEvalCoord1d</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLdouble <i><tt>u</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord1f</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLfloat <i><tt>u</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord2d</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLdouble <i><tt>u</tt></i>
              , GLdouble <i><tt>v</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord2f</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLfloat <i><tt>u</tt></i>
              , GLfloat <i><tt>v</tt></i>
              );</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glEvalCoord.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>
                <tt>glEvalCoord1d</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord1f</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord2d</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              , 
                <i><tt>v</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord2f</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              , 
                <i><tt>v</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr></table></div><div class="refsect1" lang="en"><a name="glEvalCoord.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term">
                <i><tt>u</tt></i>
              </span></dt><dd>
						Specifies a value that is the domain coordinate <i><tt>u</tt></i> to the basis function defined in a
						previous <tt>glMap1</tt> or <tt>glMap2</tt>
						command.
					</dd><dt><span class="term">
                <i><tt>v</tt></i>
              </span></dt><dd>
						Specifies a value that is the domain coordinate <i><tt>v</tt></i> to the basis function defined in a
						previous <tt>glMap2</tt> command. This argument is not present in a
						<tt>glEvalCoord1</tt> command.
					</dd></dl></div></div><div class="refsynopsisdiv"><a name="glEvalCoord.3G-c_spec-v"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glEvalCoord1dv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLdouble *<i><tt>u</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord1fv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLfloat *<i><tt>u</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord2dv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLdouble *<i><tt>u</tt></i>
              );</code></td></tr><tr><td valign="top"><code>void <tt>glEvalCoord2fv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLfloat *<i><tt>u</tt></i>
              );</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glEvalCoord.3G-python_spec-v"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>
                <tt>glEvalCoord1dv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord1fv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord2dv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr><tr><td valign="top"><code>
                <tt>glEvalCoord2fv</tt>
              </code></td><td valign="top"><code>(</code></td><td valign="top"><code>
                <i><tt>u</tt></i>
              ) &#8594; 
                <tt>None</tt>
              </code></td></tr></table></div><div class="refsect1" lang="en"><a name="glEvalCoord.3G-parameters-v"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term">
                <i><tt>u</tt></i>
              </span></dt><dd>
						Specifies a pointer to an array containing either one or two domain coordinates. The first coordinate is
						<i><tt>u</tt></i>. The second coordinate is <i><tt>v</tt></i>, which is present only in
						<tt>glEvalCoord2</tt> versions.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glEvalCoord.3G-description"/><h2>Description</h2><p>
			<tt>glEvalCoord1</tt> evaluates enabled one-dimensional maps at argument
			<i><tt>u</tt></i>. <tt>glEvalCoord2</tt> does the same for two-dimensional maps
			using two domain values, <i><tt>u</tt></i> and <i><tt>v</tt></i>. To define a map, call <tt>glMap1</tt> and <tt>glMap2</tt>; to enable and disable it,
			call <a href="glEnable.3G.xml"><tt>glEnable</tt></a> and <a href="glEnable.3G.xml"><tt>glDisable</tt></a>.
		</p><p>
			When one of the <tt>glEvalCoord</tt> commands is issued, all currently enabled maps of
			the indicated dimension are evaluated. Then, for each enabled map, it is as if the corresponding GL command had been
			issued with the computed value. That is, if <tt>GL_MAP1_INDEX</tt> or <tt>GL_MAP2_INDEX</tt> is
			enabled, a <tt>glIndex</tt> command is simulated. If
			<tt>GL_MAP1_COLOR_4</tt> or <tt>GL_MAP2_COLOR_4</tt> is enabled, a <tt>glColor</tt> command is simulated. If <tt>GL_MAP1_NORMAL</tt> or
			<tt>GL_MAP2_NORMAL</tt> is enabled, a normal vector is produced, and if any of
			<tt>GL_MAP1_TEXTURE_COORD_1</tt>, <tt>GL_MAP1_TEXTURE_COORD_2</tt>,
			<tt>GL_MAP1_TEXTURE_COORD_3</tt>, <tt>GL_MAP1_TEXTURE_COORD_4</tt>,
			<tt>GL_MAP2_TEXTURE_COORD_1</tt>, <tt>GL_MAP2_TEXTURE_COORD_2</tt>,
			<tt>GL_MAP2_TEXTURE_COORD_3</tt>, or <tt>GL_MAP2_TEXTURE_COORD_4</tt> is enabled, then an
			appropriate <tt>glTexCoord</tt> command is simulated.
		</p><p>
			For color, color index, normal, and texture coordinates the GL uses evaluated values instead of current values for
			those evaluations that are enabled, and current values otherwise, However, the evaluated values do not update the
			current values. Thus, if <tt>glVertex</tt> commands are interspersed with <tt>glEvalCoord</tt> commands, the color, normal, and texture coordinates associated with the
			<tt>glVertex</tt> commands are not affected by the values generated by the <tt>glEvalCoord</tt> commands, but only by the most recent <tt>glColor</tt>, <tt>glIndex</tt>, <tt>glNormal</tt>, and <tt>glTexCoord</tt> commands.
		</p><p>
			No commands are issued for maps that are not enabled. If more than one texture evaluation is enabled for a particular
			dimension (for example, <tt>GL_MAP2_TEXTURE_COORD_1</tt> and <tt>GL_MAP2_TEXTURE_COORD_2</tt>),
			then only the evaluation of the map that produces the larger number of coordinates (in this case,
			<tt>GL_MAP2_TEXTURE_COORD_2</tt>) is carried out. <tt>GL_MAP1_VERTEX_4</tt> overrides
			<tt>GL_MAP1_VERTEX_3</tt>, and <tt>GL_MAP2_VERTEX_4</tt> overrides
			<tt>GL_MAP2_VERTEX_3</tt>, in the same manner. If neither a three- nor a four-component vertex map is
			enabled for the specified dimension, the <tt>glEvalCoord</tt> command is ignored.
		</p><p>
			If you have enabled automatic normal generation, by calling <a href="glEnable.3G.xml"><tt>glEnable</tt></a> with
			argument <tt>GL_AUTO_NORMAL</tt>, <tt>glEvalCoord2</tt> generates surface
			normals analytically, regardless of the contents or enabling of the <tt>GL_MAP2_NORMAL</tt> map. Let
		</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
				<mml:mi>m</mml:mi>
				<mml:mo>=</mml:mo>
				<mml:mfrac>
					<mml:mrow>
						<mml:mo>&#8706;</mml:mo>
						<mml:mi>p</mml:mi>
					</mml:mrow>
					<mml:mrow>
						<mml:mo>&#8706;</mml:mo>
						<mml:mi>u</mml:mi>
					</mml:mrow>
				</mml:mfrac>
				<mml:mo>×</mml:mo>
				<mml:mfrac>
					<mml:mrow>
						<mml:mo>&#8706;</mml:mo>
						<mml:mi>p</mml:mi>
					</mml:mrow>
					<mml:mrow>
						<mml:mo>&#8706;</mml:mo>
						<mml:mi>v</mml:mi>
					</mml:mrow>
				</mml:mfrac>
			</mml:math></div><p>
			Then the generated normal <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>n</mml:mi>
				</mml:math> is
		</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
				<mml:mi>n</mml:mi>
				<mml:mo>=</mml:mo>
				<mml:mfrac>
					<mml:mi>m</mml:mi>
					<mml:mfenced separator="," close="&#8741;" open="&#8741;">
						<mml:mi>m</mml:mi>
					</mml:mfenced>
				</mml:mfrac>
			</mml:math></div><p>
			If automatic normal generation is disabled, the corresponding normal map <tt>GL_MAP2_NORMAL</tt>, if
			enabled, is used to produce a normal. If neither automatic normal generation nor a normal map is enabled, no normal is
			generated for <tt>glEvalCoord2</tt> commands.
		</p></div><div class="refsect1" lang="en"><a name="glEvalCoord.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_VERTEX_3</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_VERTEX_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_INDEX</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_COLOR_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_NORMAL</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_TEXTURE_COORD_1</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_TEXTURE_COORD_2</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_TEXTURE_COORD_3</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP1_TEXTURE_COORD_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_VERTEX_3</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_VERTEX_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_INDEX</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_COLOR_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_NORMAL</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_TEXTURE_COORD_1</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_TEXTURE_COORD_2</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_TEXTURE_COORD_3</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_MAP2_TEXTURE_COORD_4</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_AUTO_NORMAL</tt>
		</p><p>
			<tt>glGetMap</tt>
		</p></div><div class="refsect1" lang="en"><a name="glEvalCoord.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist">
                <a href="glBegin.3G.xml">glBegin</a>
              , 
                <a href="glColor.3G.xml">glColor</a>
              , 
                <a href="glEnable.3G.xml">glEnable</a>
              , 
                <a href="glEvalMesh.3G.xml">glEvalMesh</a>
              , 
                <a href="glEvalPoint.3G.xml">glEvalPoint</a>
              , 
                <a href="glIndex.3G.xml">glIndex</a>
              , 
                <a href="glMap1.3G.xml">glMap1</a>
              , 
                <a href="glMap2.3G.xml">glMap2</a>
              , 
                <a href="glMapGrid.3G.xml">glMapGrid</a>
              , 
                <a href="glNormal.3G.xml">glNormal</a>
              , 
                <a href="glTexCoord.3G.xml">glTexCoord</a>
              , 
                <a href="glVertex.3G.xml">glVertex</a>
              </span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glEnableClientState.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glEvalMesh.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glEnableClientState </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glEvalMesh</td></tr></table></div></body></html>