<?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>glMap2</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="PyOpenGL 2.0.1.09 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glMap1.3G.xml" title="glMap1"/><link rel="next" href="glMapGrid.3G.xml" title="glMapGrid"/></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">glMap2</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glMap1.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glMapGrid.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glMap2.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glMap2.3G-name"/><h2>Name</h2><p>glMap2d, glMap2f &#8212; define a two-dimensional evaluator</p></div><div class="refsynopsisdiv"><a name="glMap2.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glMap2d</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLdouble <i><tt>u1</tt></i>, GLdouble <i><tt>u2</tt></i>, GLint <i><tt>ustride</tt></i>, GLint <i><tt>uorder</tt></i>, GLdouble <i><tt>v1</tt></i>, GLdouble <i><tt>v2</tt></i>, GLint <i><tt>vstride</tt></i>, GLint <i><tt>vorder</tt></i>, const GLdouble *<i><tt>points</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glMap2f</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLfloat <i><tt>u1</tt></i>, GLfloat <i><tt>u2</tt></i>, GLint <i><tt>ustride</tt></i>, GLint <i><tt>uorder</tt></i>, GLfloat <i><tt>v1</tt></i>, GLfloat <i><tt>v2</tt></i>, GLint <i><tt>vstride</tt></i>, GLint <i><tt>vorder</tt></i>, const GLfloat *<i><tt>points</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glMap2.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glMap2d</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>u1</tt></i>, <i><tt>u2</tt></i>, <i><tt>v1</tt></i>, <i><tt>v2</tt></i>, <i><tt>points</tt></i>[][][]) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glMap2f</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>u1</tt></i>, <i><tt>u2</tt></i>, <i><tt>v1</tt></i>, <i><tt>v2</tt></i>, <i><tt>points</tt></i>[][][]) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glMap2.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						Specifies the kind of values that are generated by the evaluator. Symbolic constants
						<tt>GL_MAP2_VERTEX_3</tt>, <tt>GL_MAP2_VERTEX_4</tt>,
						<tt>GL_MAP2_INDEX</tt>, <tt>GL_MAP2_COLOR_4</tt>,
						<tt>GL_MAP2_NORMAL</tt>, <tt>GL_MAP2_TEXTURE_COORD_1</tt>,
						<tt>GL_MAP2_TEXTURE_COORD_2</tt>, <tt>GL_MAP2_TEXTURE_COORD_3</tt>, and
						<tt>GL_MAP2_TEXTURE_COORD_4</tt> are accepted.
					</dd><dt><span class="term"><i><tt>u1</tt></i>, <i><tt>u2</tt></i></span></dt><dd>
						Specify a linear mapping of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>u</mml:mi>
							</mml:math>, as presented to <tt>glEvalCoord2</tt>, to
						<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mover>
									<mml:mi>u</mml:mi>
									<mml:mo>&#770;</mml:mo>
								</mml:mover>
							</mml:math>, one of the two variables that are evaluated by the equations specified by this command.
						Initially, <i><tt>u1</tt></i> is 0 and <i><tt>u2</tt></i> is 1.
					</dd><dt><span class="term"><i><tt>ustride</tt></i></span></dt><dd>
						Specifies the number of floats or doubles between the beginning of control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:msub>
									<mml:mi>R</mml:mi>
									<mml:mi>ij</mml:mi>
								</mml:msub>
							</mml:math> and the beginning of control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:msub>
									<mml:mi>R</mml:mi>
									<mml:mrow>
										<mml:mo>(</mml:mo>
										<mml:mi>i+1</mml:mi>
										<mml:mo>)</mml:mo>
										<mml:mi>j</mml:mi>
									</mml:mrow>
								</mml:msub>
							</mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>i</mml:mi>
							</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>j</mml:mi>
							</mml:math> are the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>u</mml:mi>
							</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>v</mml:mi>
							</mml:math> control point indices, respectively. This allows control points to be embedded in
						arbitrary data structures. The only constraint is that the values for a particular control point must
						occupy contiguous memory locations. The initial value of <i><tt>ustride</tt></i> is 0.
					</dd><dt><span class="term"><i><tt>uorder</tt></i></span></dt><dd>
						Specifies the dimension of the control point array in the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>u</mml:mi>
							</mml:math> axis. Must be positive. The initial value is 1.
					</dd><dt><span class="term"><i><tt>v1</tt></i>, <i><tt>v2</tt></i></span></dt><dd>
						Specify a linear mapping of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>v</mml:mi>
							</mml:math>, as presented to <tt>glEvalCoord2</tt>, to
						<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mover>
									<mml:mi>v</mml:mi>
									<mml:mo>&#770;</mml:mo>
								</mml:mover>
							</mml:math>, one of the two variables that are evaluated by the equations specified by this command.
						Initially, <i><tt>v1</tt></i> is 0 and <i><tt>v2</tt></i> is 1.
					</dd><dt><span class="term"><i><tt>vstride</tt></i></span></dt><dd>
						Specifies the number of floats or doubles between the beginning of control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:msub>
									<mml:mi>R</mml:mi>
									<mml:mi>ij</mml:mi>
								</mml:msub>
							</mml:math> and the beginning of control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:msub>
									<mml:mi>R</mml:mi>
									<mml:mrow>
										<mml:mi>i</mml:mi>
										<mml:mo>(</mml:mo>
										<mml:mi>j+1</mml:mi>
										<mml:mo>)</mml:mo>
									</mml:mrow>
								</mml:msub>
							</mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>i</mml:mi>
							</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>j</mml:mi>
							</mml:math> are the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>u</mml:mi>
							</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>v</mml:mi>
							</mml:math> control point indices, respectively. This allows control points to be embedded in
						arbitrary data structures. The only constraint is that the values for a particular control point must
						occupy contiguous memory locations. The initial value of <i><tt>vstride</tt></i> is 0.
					</dd><dt><span class="term"><i><tt>vorder</tt></i></span></dt><dd>
						Specifies the dimension of the control point array in the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>v</mml:mi>
							</mml:math> axis. Must be positive. The initial value is 1.
					</dd><dt><span class="term"><i><tt>points</tt></i></span></dt><dd>
						Specifies a pointer to the array of control points.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glMap2.3G-description"/><h2>Description</h2><p>
			Evaluators provide a way to use polynomial or rational polynomial mapping to produce vertices, normals, texture
			coordinates, and colors. The values produced by an evaluator are sent on to further stages of GL processing just as if
			they had been presented using <tt>glVertex</tt>, <tt>glNormal</tt>, <tt>glTexCoord</tt>, and <tt>glColor</tt> commands, except that the generated values do not update the current normal,
			texture coordinates, or color.
		</p><p>
			All polynomial or rational polynomial splines of any degree (up to the maximum degree supported by the GL
			implementation) can be described using evaluators. These include almost all surfaces used in computer graphics,
			including B-spline surfaces, NURBS surfaces, Bezier surfaces, and so on.
		</p><p>
			Evaluators define surfaces based on bivariate Bernstein polynomials. Define <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>p</mml:mi>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
					</mml:mrow>
				</mml:math> as </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
					<mml:mrow>
						<mml:mi>p</mml:mi>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
						<mml:mo>=</mml:mo>
						<mml:munderover>
							<mml:mo>&#8721;</mml:mo>
							<mml:mrow>
								<mml:mi>i</mml:mi>
								<mml:mo>=</mml:mo>
								<mml:mn>0</mml:mn>
							</mml:mrow>
							<mml:mi>n</mml:mi>
						</mml:munderover>
						<mml:munderover>
							<mml:mo>&#8721;</mml:mo>
							<mml:mrow>
								<mml:mi>j</mml:mi>
								<mml:mo>=</mml:mo>
								<mml:mn>0</mml:mn>
							</mml:mrow>
							<mml:mi>m</mml:mi>
						</mml:munderover>
						<mml:mrow>
							<mml:msup>
								<mml:msub>
									<mml:mi>B</mml:mi>
									<mml:mi>i</mml:mi>
								</mml:msub>
								<mml:mi>n</mml:mi>
							</mml:msup>
							<mml:mo>(</mml:mo>
							<mml:mover>
								<mml:mi>u</mml:mi>
								<mml:mo>&#770;</mml:mo>
							</mml:mover>
							<mml:mo>)</mml:mo>
							<mml:msup>
								<mml:msub>
									<mml:mi>B</mml:mi>
									<mml:mi>j</mml:mi>
								</mml:msub>
								<mml:mi>m</mml:mi>
							</mml:msup>
							<mml:mo>(</mml:mo>
							<mml:mover>
								<mml:mi>v</mml:mi>
								<mml:mo>&#770;</mml:mo>
							</mml:mover>
							<mml:mo>)</mml:mo>
							<mml:msub>
								<mml:mi>R</mml:mi>
								<mml:mi>ij</mml:mi>
							</mml:msub>
						</mml:mrow>
					</mml:mrow>
				</mml:math></div><p>
		</p><p>
			where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>R</mml:mi>
						<mml:mi>ij</mml:mi>
					</mml:msub>
				</mml:math> is a control point, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:msup>
							<mml:msub>
								<mml:mi>B</mml:mi>
								<mml:mi>i</mml:mi>
							</mml:msub>
							<mml:mi>n</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
					</mml:mrow>
				</mml:math> is the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>i</mml:mi>
				</mml:math>th Bernstein polynomial of degree
			<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>n</mml:mi>
				</mml:math> (<i><tt>uorder</tt></i> = <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>n</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:mn>1</mml:mn>
					</mml:mrow>
				</mml:math>) </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
					<mml:mrow>
						<mml:msup>
							<mml:msub>
								<mml:mi>B</mml:mi>
								<mml:mi>i</mml:mi>
							</mml:msub>
							<mml:mi>n</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
						<mml:mo>=</mml:mo>
						<mml:mrow>
							<mml:mo>(</mml:mo>
							<mml:mtable columnalign="center">
								<mml:mtr>
									<mml:mtd>
										<mml:mi>n</mml:mi>
									</mml:mtd>
								</mml:mtr>
								<mml:mtr>
									<mml:mtd>
										<mml:mi>i</mml:mi>
									</mml:mtd>
								</mml:mtr>
							</mml:mtable>
							<mml:mo>)</mml:mo>
						</mml:mrow>
						<mml:msup>
							<mml:mover>
								<mml:mi>u</mml:mi>
								<mml:mo>&#770;</mml:mo>
							</mml:mover>
							<mml:mi>i</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mn>1</mml:mn>
						<mml:mo>-</mml:mo>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:msup>
							<mml:mo>)</mml:mo>
							<mml:mrow>
								<mml:mi>n</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>i</mml:mi>
							</mml:mrow>
						</mml:msup>
					</mml:mrow>
				</mml:math></div><p> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:msup>
							<mml:msub>
								<mml:mi>B</mml:mi>
								<mml:mi>j</mml:mi>
							</mml:msub>
							<mml:mi>m</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
					</mml:mrow>
				</mml:math> is the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>j</mml:mi>
				</mml:math>th Bernstein polynomial of degree <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>m</mml:mi>
				</mml:math> (<i><tt>vorder</tt></i> = <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>m</mml:mi>
						<mml:mo>+</mml:mo>
						<mml:mn>1</mml:mn>
					</mml:mrow>
				</mml:math>) </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
					<mml:mrow>
						<mml:msup>
							<mml:msub>
								<mml:mi>B</mml:mi>
								<mml:mi>j</mml:mi>
							</mml:msub>
							<mml:mi>m</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>)</mml:mo>
						<mml:mo>=</mml:mo>
						<mml:mrow>
							<mml:mo>(</mml:mo>
							<mml:mtable columnalign="center">
								<mml:mtr>
									<mml:mtd>
										<mml:mi>m</mml:mi>
									</mml:mtd>
								</mml:mtr>
								<mml:mtr>
									<mml:mtd>
										<mml:mi>j</mml:mi>
									</mml:mtd>
								</mml:mtr>
							</mml:mtable>
							<mml:mo>)</mml:mo>
						</mml:mrow>
						<mml:msup>
							<mml:mover>
								<mml:mi>v</mml:mi>
								<mml:mo>&#770;</mml:mo>
							</mml:mover>
							<mml:mi>j</mml:mi>
						</mml:msup>
						<mml:mo>(</mml:mo>
						<mml:mn>1</mml:mn>
						<mml:mo>-</mml:mo>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:msup>
							<mml:mo>)</mml:mo>
							<mml:mrow>
								<mml:mi>m</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>j</mml:mi>
							</mml:mrow>
						</mml:msup>
					</mml:mrow>
				</mml:math></div><p>Recall that <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:msup>
							<mml:mn>0</mml:mn>
							<mml:mn>0</mml:mn>
						</mml:msup>
						<mml:mo>&#8801;</mml:mo>
						<mml:mn>1</mml:mn>
					</mml:mrow>
				</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mrow>
							<mml:mo>(</mml:mo>
							<mml:mtable columnalign="center">
								<mml:mtr>
									<mml:mtd>
										<mml:mi>n</mml:mi>
									</mml:mtd>
								</mml:mtr>
								<mml:mtr>
									<mml:mtd>
										<mml:mn>0</mml:mn>
									</mml:mtd>
								</mml:mtr>
							</mml:mtable>
							<mml:mo>)</mml:mo>
						</mml:mrow>
						<mml:mo>&#8801;</mml:mo>
						<mml:mn>1</mml:mn>
					</mml:mrow>
				</mml:math> <tt>glMap2</tt> is used to define the basis and to specify what kind
			of values are produced. Once defined, a map can be enabled and disabled by calling <a href="glEnable.3G.xml"><tt>glEnable</tt></a> and <a href="glEnable.3G.xml"><tt>glDisable</tt></a> with the map name, one
			of the nine predefined values for <i><tt>target</tt></i>, described below. When <tt>glEvalCoord2</tt> presents values <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>u</mml:mi>
				</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mi>v</mml:mi>
				</mml:math>, the bivariate Bernstein polynomials are evaluated using <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mover>
						<mml:mi>u</mml:mi>
						<mml:mo>&#770;</mml:mo>
					</mml:mover>
				</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mover>
						<mml:mi>v</mml:mi>
						<mml:mo>&#770;</mml:mo>
					</mml:mover>
				</mml:math>, where
			</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
					<mml:mrow>
						<mml:mover>
							<mml:mi>u</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>=</mml:mo>
						<mml:mfrac>
							<mml:mrow>
								<mml:mi>u</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>u1</mml:mi>
							</mml:mrow>
							<mml:mrow>
								<mml:mi>u2</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>u1</mml:mi>
							</mml:mrow>
						</mml:mfrac>
					</mml:mrow>
				</mml:math></div><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll">
					<mml:mrow>
						<mml:mover>
							<mml:mi>v</mml:mi>
							<mml:mo>&#770;</mml:mo>
						</mml:mover>
						<mml:mo>=</mml:mo>
						<mml:mfrac>
							<mml:mrow>
								<mml:mi>v</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>v1</mml:mi>
							</mml:mrow>
							<mml:mrow>
								<mml:mi>v2</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>v1</mml:mi>
							</mml:mrow>
						</mml:mfrac>
					</mml:mrow>
				</mml:math></div><p>
			<i><tt>target</tt></i> is a symbolic constant that indicates what kind of control points are
			provided in <i><tt>points</tt></i>, and what output is generated when the map is evaluated. It can assume one of
			nine predefined values:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_MAP2_VERTEX_3</tt></span></dt><dd>
						Each control point is three floating-point values representing <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>x</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>y</mml:mi>
							</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>z</mml:mi>
							</mml:math>. Internal <tt>glVertex3</tt> commands are generated when
						the map is evaluated.
					</dd><dt><span class="term"><tt>GL_MAP2_VERTEX_4</tt></span></dt><dd>
						Each control point is four floating-point values representing <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>x</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>y</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>z</mml:mi>
							</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>w</mml:mi>
							</mml:math>. Internal <tt>glVertex4</tt> commands are generated when
						the map is evaluated.
					</dd><dt><span class="term"><tt>GL_MAP2_INDEX</tt></span></dt><dd>
						Each control point is a single floating-point value representing a color index. Internal <tt>glIndex</tt> commands are generated when the map is evaluated but the current
						index is not updated with the value of these <tt>glIndex</tt> commands.
					</dd><dt><span class="term"><tt>GL_MAP2_COLOR_4</tt></span></dt><dd>
						Each control point is four floating-point values representing red, green, blue, and alpha. Internal
						<tt>glColor4</tt> commands are generated when the map is evaluated but the
						current color is not updated with the value of these <tt>glColor4</tt>
						commands.
					</dd><dt><span class="term"><tt>GL_MAP2_NORMAL</tt></span></dt><dd>
						Each control point is three floating-point values representing the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>x</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>y</mml:mi>
							</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>z</mml:mi>
							</mml:math> components of a normal vector. Internal <tt>glNormal</tt>
						commands are generated when the map is evaluated but the current normal is not updated with the value of
						these <tt>glNormal</tt> commands.
					</dd><dt><span class="term"><tt>GL_MAP2_TEXTURE_COORD_1</tt></span></dt><dd>
						Each control point is a single floating-point value representing the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>s</mml:mi>
							</mml:math> texture coordinate. Internal
					</dd></dl></div><p>
			<tt>glTexCoord1</tt> commands are generated when the map is evaluated but the current
			texture coordinates are not updated with the value of these <tt>glTexCoord</tt>
			commands.
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_MAP2_TEXTURE_COORD_2</tt></span></dt><dd>
						Each control point is two floating-point values representing the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>s</mml:mi>
							</mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>t</mml:mi>
							</mml:math> texture coordinates. Internal
					</dd></dl></div><p>
			<tt>glTexCoord2</tt> commands are generated when the map is evaluated but the current
			texture coordinates are not updated with the value of these <tt>glTexCoord</tt>
			commands.
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_MAP2_TEXTURE_COORD_3</tt></span></dt><dd>
						Each control point is three floating-point values representing the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>s</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>t</mml:mi>
							</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>r</mml:mi>
							</mml:math> texture coordinates. Internal <tt>glTexCoord3</tt>
						commands are generated when the map is evaluated but the current texture coordinates are not updated with
						the value of these <tt>glTexCoord</tt> commands.
					</dd><dt><span class="term"><tt>GL_MAP2_TEXTURE_COORD_4</tt></span></dt><dd>
						Each control point is four floating-point values representing the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>s</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>t</mml:mi>
							</mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>r</mml:mi>
							</mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>q</mml:mi>
							</mml:math> texture coordinates. Internal
					</dd></dl></div><p>
			<tt>glTexCoord4</tt> commands are generated when the map is evaluated but the current
			texture coordinates are not updated with the value of these <tt>glTexCoord</tt>
			commands.
		</p><p>
			<i><tt>ustride</tt></i>, <i><tt>uorder</tt></i>, <i><tt>vstride</tt></i>,
			<i><tt>vorder</tt></i>, and <i><tt>points</tt></i> define the array addressing for accessing the control
			points. <i><tt>points</tt></i> is the location of the first control point, which occupies one, two, three, or
			four contiguous memory locations, depending on which map is being defined. There are <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:mrow>
						<mml:mi>uorder</mml:mi>
						<mml:mo>×</mml:mo>
						<mml:mi>vorder</mml:mi>
					</mml:mrow>
				</mml:math> control points in the array. <i><tt>ustride</tt></i> specifies how many float or double
			locations are skipped to advance the internal memory pointer from control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>R</mml:mi>
						<mml:mrow>
							<mml:mi>i</mml:mi>
							<mml:mi>j</mml:mi>
						</mml:mrow>
					</mml:msub>
				</mml:math> to control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>R</mml:mi>
						<mml:mrow>
							<mml:mo>(</mml:mo>
							<mml:mi>i+1</mml:mi>
							<mml:mo>)</mml:mo>
							<mml:mi>j</mml:mi>
						</mml:mrow>
					</mml:msub>
				</mml:math>. <i><tt>vstride</tt></i> specifies how many float or double locations are skipped to advance
			the internal memory pointer from control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>R</mml:mi>
						<mml:mrow>
							<mml:mi>i</mml:mi>
							<mml:mi>j</mml:mi>
						</mml:mrow>
					</mml:msub>
				</mml:math> to control point <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>R</mml:mi>
						<mml:mrow>
							<mml:mi>i</mml:mi>
							<mml:mo>(</mml:mo>
							<mml:mi>j+1</mml:mi>
							<mml:mo>)</mml:mo>
						</mml:mrow>
					</mml:msub>
				</mml:math>.
		</p></div><div class="refsect1" lang="en"><a name="glMap2.3G-notes"/><h2>Notes</h2><p>
			As is the case with all GL commands that accept pointers to data, it is as if the contents of
			<i><tt>points</tt></i> were copied by <tt>glMap2</tt> before <tt>glMap2</tt> returns. Changes to the contents of <i><tt>points</tt></i> have no effect
			after <tt>glMap2</tt> is called.
		</p><p>
			Initially, <tt>GL_AUTO_NORMAL</tt> is enabled. If <tt>GL_AUTO_NORMAL</tt> is enabled, normal
			vectors are generated when either <tt>GL_MAP2_VERTEX_3</tt> or <tt>GL_MAP2_VERTEX_4</tt> is
			used to generate vertices.
		</p></div><div class="refsect1" lang="en"><a name="glMap2.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>target</tt></i> is not an accepted value.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>u1</tt></i> is equal to <i><tt>u2</tt></i>,
			or if <i><tt>v1</tt></i> is equal to <i><tt>v2</tt></i>.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> is generated if either <i><tt>ustride</tt></i> or
			<i><tt>vstride</tt></i> is less than the number of values in a control point.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> is generated if either <i><tt>uorder</tt></i> or
			<i><tt>vorder</tt></i> is less than 1 or greater than the return value of
			<tt>GL_MAX_EVAL_ORDER</tt>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glMap2</tt> is executed
			between the execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p><p>
			When the <tt>GL_ARB_multitexture</tt> extension is supported, <tt>GL_INVALID_OPERATION</tt> is
			generated if <tt>glMap2</tt> is called and the value of
			<tt>GL_ACTIVE_TEXTURE_ARB</tt> is not <tt>GL_TEXTURE0_ARB</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glMap2.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGetMap</tt>
		</p><p>
			<tt>glGet</tt> with argument <tt>GL_MAX_EVAL_ORDER</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></div><div class="refsect1" lang="en"><a name="glMap2.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="glEvalCoord.3G.xml">glEvalCoord</a>, <a href="glEvalMesh.3G.xml">glEvalMesh</a>, <a href="glEvalPoint.3G.xml">glEvalPoint</a>, <a href="glMap1.3G.xml">glMap1</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="glMap1.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="glMapGrid.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glMap1 </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glMapGrid</td></tr></table></div></body></html>