<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"><!-- saved from url=(0013)about:internet -->
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glMap2</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div class="refentry"><a id="glMap2"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glMap2 — define a two-dimensional evaluator</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <strong class="fsfunc">glMap2f</strong>(</code></td><td>GLenum <var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLfloat <var class="pdparam">u1</var>, </td></tr><tr><td> </td><td>GLfloat <var class="pdparam">u2</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">ustride</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">uorder</var>, </td></tr><tr><td> </td><td>GLfloat <var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLfloat <var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">vstride</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">vorder</var>, </td></tr><tr><td> </td><td>const GLfloat * <var class="pdparam">points</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <strong class="fsfunc">glMap2d</strong>(</code></td><td>GLenum <var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLdouble <var class="pdparam">u1</var>, </td></tr><tr><td> </td><td>GLdouble <var class="pdparam">u2</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">ustride</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">uorder</var>, </td></tr><tr><td> </td><td>GLdouble <var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLdouble <var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">vstride</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">vorder</var>, </td></tr><tr><td> </td><td>const GLdouble * <var class="pdparam">points</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
                    Specifies the kind of values that are generated by the evaluator.
                    Symbolic constants
                    <code class="constant">GL_MAP2_VERTEX_3</code>,
                    <code class="constant">GL_MAP2_VERTEX_4</code>,
                    <code class="constant">GL_MAP2_INDEX</code>,
                    <code class="constant">GL_MAP2_COLOR_4</code>,
                    <code class="constant">GL_MAP2_NORMAL</code>,
                    <code class="constant">GL_MAP2_TEXTURE_COORD_1</code>,
                    <code class="constant">GL_MAP2_TEXTURE_COORD_2</code>,
                    <code class="constant">GL_MAP2_TEXTURE_COORD_3</code>, and
                    <code class="constant">GL_MAP2_TEXTURE_COORD_4</code> are accepted.
                </p></dd><dt><span class="term"><em class="parameter"><code>u1</code></em>, </span><span class="term"><em class="parameter"><code>u2</code></em></span></dt><dd><p>
                    Specify a linear mapping of 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>,
                    as presented to <a class="citerefentry" href="glEvalCoord2.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord2</span></span></a>,
                    to 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                        
                        <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    </mml:math>,
                    one of the two variables that are evaluated by the equations specified
                    by this command. Initially, <em class="parameter"><code>u1</code></em> is 0 and <em class="parameter"><code>u2</code></em> is 1.
                </p></dd><dt><span class="term"><em class="parameter"><code>ustride</code></em></span></dt><dd><p>
                    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 mathvariant="italic">R</mml:mi>
                        <mml:mi mathvariant="italic">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 mathvariant="italic">R</mml:mi>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mfenced open="(" close=")">
                                    <mml:mrow>
                                        <mml:mi mathvariant="italic">i</mml:mi>
                                        <mml:mo>+</mml:mo>
                                        <mml:mn>1</mml:mn>
                                    </mml:mrow>
                                </mml:mfenced>
                                <mml:mo>⁢</mml:mo>
                                <mml:mi mathvariant="italic">j</mml:mi>
                            </mml:mrow>
                        </mml:mfenced>
                        </mml:msub>
                    </mml:math>,
                    where 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
                    and 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">j</mml:mi></mml:math>
                    are the 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>
                    and 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">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 <em class="parameter"><code>ustride</code></em> is 0.
                </p></dd><dt><span class="term"><em class="parameter"><code>uorder</code></em></span></dt><dd><p>
                    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 mathvariant="italic">u</mml:mi></mml:math>
                    axis.
                    Must be positive. The initial value is 1.
                </p></dd><dt><span class="term"><em class="parameter"><code>v1</code></em>, </span><span class="term"><em class="parameter"><code>v2</code></em></span></dt><dd><p>
                    Specify a linear mapping of 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">v</mml:mi></mml:math>,
                    as presented to <a class="citerefentry" href="glEvalCoord2.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord2</span></span></a>,
                    to 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                        
                        <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    </mml:math>,
                    one of the two variables that are evaluated by the equations specified
                    by this command. Initially, <em class="parameter"><code>v1</code></em> is 0 and <em class="parameter"><code>v2</code></em> is 1.
                </p></dd><dt><span class="term"><em class="parameter"><code>vstride</code></em></span></dt><dd><p>
                    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 mathvariant="italic">R</mml:mi>
                        <mml:mi mathvariant="italic">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 mathvariant="italic">R</mml:mi>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">i</mml:mi>
                                <mml:mo>⁡</mml:mo>
                                <mml:mfenced open="(" close=")">
                                    <mml:mrow>
                                        <mml:mi mathvariant="italic">j</mml:mi>
                                        <mml:mo>+</mml:mo>
                                        <mml:mn>1</mml:mn>
                                    </mml:mrow>
                                </mml:mfenced>
                            </mml:mrow>
                        </mml:mfenced>
                        </mml:msub>
                    </mml:math>,
                    where 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
                    and 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">j</mml:mi></mml:math>
                    are the 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>
                    and 
                    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">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 <em class="parameter"><code>vstride</code></em> is 0.
                </p></dd><dt><span class="term"><em class="parameter"><code>vorder</code></em></span></dt><dd><p>
                    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 mathvariant="italic">v</mml:mi></mml:math>
                    axis.
                    Must be positive. The initial value is 1.
                </p></dd><dt><span class="term"><em class="parameter"><code>points</code></em></span></dt><dd><p>
                    Specifies a pointer to the array of control points.
                </p></dd></dl></div></div><div class="refsect1"><a id="description"></a><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
            <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a>,
            <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>,
            <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>, and
            <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a> 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 mathvariant="italic">p</mml:mi>
                    <mml:mo>⁡</mml:mo>
                    <mml:mfenced open="(" close=")">
                        <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    </mml:mfenced>
                </mml:mrow>
            </mml:math>
            as
        </p><p>
            </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mrow>
                        <mml:mi mathvariant="italic">p</mml:mi>
                        <mml:mo>⁡</mml:mo>
                        <mml:mfenced open="(" close=")">
                            <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                            <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        </mml:mfenced>
                    </mml:mrow>
                    <mml:mo>=</mml:mo>
                    <mml:mrow>
                        <mml:munderover>
                            <mml:mo>Σ</mml:mo>
                            <mml:mrow>
                                <mml:mi mathvariant="italic">i</mml:mi>
                                <mml:mo>=</mml:mo>
                                <mml:mn>0</mml:mn>
                            </mml:mrow>
                            <mml:mi mathvariant="italic">n</mml:mi>
                        </mml:munderover>
                        <mml:mrow>
                            <mml:munderover>
                                <mml:mo>Σ</mml:mo>
                                <mml:mrow>
                                    <mml:mi mathvariant="italic">j</mml:mi>
                                    <mml:mo>=</mml:mo>
                                    <mml:mn>0</mml:mn>
                                </mml:mrow>
                                <mml:mi mathvariant="italic">m</mml:mi>
                            </mml:munderover>
                            <mml:mrow>
                                <mml:mrow>
                                    <mml:msup><mml:mfenced open="" close="">
                                        <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                                        <mml:mi mathvariant="italic">i</mml:mi>
                                        </mml:msub>
                                    </mml:mfenced>
                                    <mml:mi mathvariant="italic">n</mml:mi>
                                    </mml:msup>
                                    <mml:mo>⁡</mml:mo>
                                    <mml:mfenced open="(" close=")">
                                        <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                                    </mml:mfenced>
                                </mml:mrow>
                                <mml:mo>⁢</mml:mo>
                                <mml:mrow>
                                    <mml:msup><mml:mfenced open="" close="">
                                        <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                                        <mml:mi mathvariant="italic">j</mml:mi>
                                        </mml:msub>
                                    </mml:mfenced>
                                    <mml:mi mathvariant="italic">m</mml:mi>
                                    </mml:msup>
                                    <mml:mo>⁡</mml:mo>
                                    <mml:mfenced open="(" close=")">
                                        <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                                    </mml:mfenced>
                                </mml:mrow>
                                <mml:mo>⁢</mml:mo>
                                <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
                                <mml:mi mathvariant="italic">ij</mml:mi>
                                </mml:msub>
                            </mml:mrow>
                        </mml:mrow>
                    </mml:mrow>
                </mml:mrow>
            </mml:math></div><p>
        </p><p>
        </p><p>
            where 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
                <mml:mi mathvariant="italic">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:mfenced open="" close="">
                        <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                        <mml:mi mathvariant="italic">i</mml:mi>
                        </mml:msub>
                    </mml:mfenced>
                    <mml:mi mathvariant="italic">n</mml:mi>
                    </mml:msup>
                    <mml:mo>⁡</mml:mo>
                    <mml:mfenced open="(" close=")">
                        <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    </mml:mfenced>
                </mml:mrow>
            </mml:math>
            is the 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">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 mathvariant="italic">n</mml:mi></mml:math>
            (<em class="parameter"><code>uorder</code></em> = 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mi mathvariant="italic">n</mml:mi>
                    <mml:mo>+</mml:mo>
                    <mml:mn>1</mml:mn>
                </mml:mrow>
            </mml:math>)
        </p><p>
            </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mrow>
                        <mml:msup><mml:mfenced open="" close="">
                            <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                            <mml:mi mathvariant="italic">i</mml:mi>
                            </mml:msub>
                        </mml:mfenced>
                        <mml:mi mathvariant="italic">n</mml:mi>
                        </mml:msup>
                        <mml:mo>⁡</mml:mo>
                        <mml:mfenced open="(" close=")">
                            <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        </mml:mfenced>
                    </mml:mrow>
                    <mml:mo>=</mml:mo>
                    <mml:mrow>
                        <mml:mfenced open="(" close=")">
                            <mml:mfenced open="" close="">
                                <mml:mtable>
                                    <mml:mtr><mml:mtd>
                                        <mml:mi mathvariant="italic">n</mml:mi>
                                    </mml:mtd></mml:mtr>
                                    <mml:mtr><mml:mtd>
                                        <mml:mi mathvariant="italic">i</mml:mi>
                                    </mml:mtd></mml:mtr>
                                </mml:mtable>
                            </mml:mfenced>
                        </mml:mfenced>
                        <mml:mo>⁢</mml:mo>
                        <mml:msup><mml:mfenced open="" close="">
                            <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        </mml:mfenced>
                        <mml:mi mathvariant="italic">i</mml:mi>
                        </mml:msup>
                        <mml:mo>⁢</mml:mo>
                        <mml:mfenced open="" close="">
                            <mml:msup><mml:mfenced open="(" close=")">
                                <mml:mrow>
                                    <mml:mn>1</mml:mn>
                                    <mml:mo>-</mml:mo>
                                    <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                                </mml:mrow>
                            </mml:mfenced>
                            <mml:mfenced open="" close="">
                                <mml:mrow>
                                    <mml:mi mathvariant="italic">n</mml:mi>
                                    <mml:mo>-</mml:mo>
                                    <mml:mi mathvariant="italic">i</mml:mi>
                                </mml:mrow>
                            </mml:mfenced>
                            </mml:msup>
                        </mml:mfenced>
                    </mml:mrow>
                </mml:mrow>
            </mml:math></div><p>
        </p><p>
            and 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:msup><mml:mfenced open="" close="">
                        <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                        <mml:mi mathvariant="italic">j</mml:mi>
                        </mml:msub>
                    </mml:mfenced>
                    <mml:mi mathvariant="italic">m</mml:mi>
                    </mml:msup>
                    <mml:mo>⁡</mml:mo>
                    <mml:mfenced open="(" close=")">
                        <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    </mml:mfenced>
                </mml:mrow>
            </mml:math>
            is the 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">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 mathvariant="italic">m</mml:mi></mml:math>
            (<em class="parameter"><code>vorder</code></em> = 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mi mathvariant="italic">m</mml:mi>
                    <mml:mo>+</mml:mo>
                    <mml:mn>1</mml:mn>
                </mml:mrow>
            </mml:math>)
        </p><p>
            </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mrow>
                        <mml:msup><mml:mfenced open="" close="">
                            <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
                            <mml:mi mathvariant="italic">j</mml:mi>
                            </mml:msub>
                        </mml:mfenced>
                        <mml:mi mathvariant="italic">m</mml:mi>
                        </mml:msup>
                        <mml:mo>⁡</mml:mo>
                        <mml:mfenced open="(" close=")">
                            <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        </mml:mfenced>
                    </mml:mrow>
                    <mml:mo>=</mml:mo>
                    <mml:mrow>
                        <mml:mfenced open="(" close=")">
                            <mml:mfenced open="" close="">
                                <mml:mtable>
                                    <mml:mtr><mml:mtd>
                                        <mml:mi mathvariant="italic">m</mml:mi>
                                    </mml:mtd></mml:mtr>
                                    <mml:mtr><mml:mtd>
                                        <mml:mi mathvariant="italic">j</mml:mi>
                                    </mml:mtd></mml:mtr>
                                </mml:mtable>
                            </mml:mfenced>
                        </mml:mfenced>
                        <mml:mo>⁢</mml:mo>
                        <mml:msup><mml:mfenced open="" close="">
                            <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                        </mml:mfenced>
                        <mml:mi mathvariant="italic">j</mml:mi>
                        </mml:msup>
                        <mml:mo>⁢</mml:mo>
                        <mml:mfenced open="" close="">
                            <mml:msup><mml:mfenced open="(" close=")">
                                <mml:mrow>
                                    <mml:mn>1</mml:mn>
                                    <mml:mo>-</mml:mo>
                                    <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                                </mml:mrow>
                            </mml:mfenced>
                            <mml:mfenced open="" close="">
                                <mml:mrow>
                                    <mml:mi mathvariant="italic">m</mml:mi>
                                    <mml:mo>-</mml:mo>
                                    <mml:mi mathvariant="italic">j</mml:mi>
                                </mml:mrow>
                            </mml:mfenced>
                            </mml:msup>
                        </mml:mfenced>
                    </mml:mrow>
                </mml:mrow>
            </mml:math></div><p>
        </p><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>==</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:mfenced open="(" close=")">
                        <mml:mfenced open="" close="">
                            <mml:mtable>
                                <mml:mtr><mml:mtd>
                                    <mml:mi mathvariant="italic">n</mml:mi>
                                </mml:mtd></mml:mtr>
                                <mml:mtr><mml:mtd>
                                    <mml:mn>0</mml:mn>
                                </mml:mtd></mml:mtr>
                            </mml:mtable>
                        </mml:mfenced>
                    </mml:mfenced>
                    <mml:mo>==</mml:mo>
                    <mml:mn>1</mml:mn>
                </mml:mrow>
            </mml:math>
        </p><p>
            <code class="function">glMap2</code> 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 class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>
            with the map name, one of the nine predefined values for <em class="parameter"><code>target</code></em>,
            described below.
            When <a class="citerefentry" href="glEvalCoord2.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord2</span></span></a> presents values 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>
            and 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">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 mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
            </mml:math>
            and 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
            </mml:math>,
            where
        </p><p>
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    <mml:mo>=</mml:mo>
                    <mml:mfrac>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">u</mml:mi>
                                <mml:mo>-</mml:mo>
                                <mml:mi mathvariant="italic">u1</mml:mi>
                            </mml:mrow>
                        </mml:mfenced>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">u2</mml:mi>
                                <mml:mo>-</mml:mo>
                                <mml:mi mathvariant="italic">u1</mml:mi>
                            </mml:mrow>
                        </mml:mfenced>
                    </mml:mfrac>
                </mml:mrow>
            </mml:math>
        </p><p>
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:mrow>
                    <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>̂</mml:mo></mml:mover>
                    <mml:mo>=</mml:mo>
                    <mml:mfrac>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">v</mml:mi>
                                <mml:mo>-</mml:mo>
                                <mml:mi mathvariant="italic">v1</mml:mi>
                            </mml:mrow>
                        </mml:mfenced>
                        <mml:mfenced open="" close="">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">v2</mml:mi>
                                <mml:mo>-</mml:mo>
                                <mml:mi mathvariant="italic">v1</mml:mi>
                            </mml:mrow>
                        </mml:mfenced>
                    </mml:mfrac>
                </mml:mrow>
            </mml:math>
        </p><p>
            <em class="parameter"><code>target</code></em> is a symbolic constant that indicates what kind of control points
            are provided in <em class="parameter"><code>points</code></em>,
            and what output is generated when the map is evaluated.
            It can assume one of nine predefined values:
        </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="constant">GL_MAP2_VERTEX_3</code></span></dt><dd><p>
                        Each control point is three floating-point values representing
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>,
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>.
                        Internal <a class="citerefentry" href="glVertex3.xml"><span class="citerefentry"><span class="refentrytitle">glVertex3</span></span></a> commands are generated when the map is evaluated.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_VERTEX_4</code></span></dt><dd><p>
                        Each control point is four floating-point values representing
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>,
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>.
                        Internal <a class="citerefentry" href="glVertex4.xml"><span class="citerefentry"><span class="refentrytitle">glVertex4</span></span></a> commands are generated when the map is evaluated.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_INDEX</code></span></dt><dd><p>
                        Each control point is a single floating-point value representing a color index.
                        Internal <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a> commands are generated when the map is evaluated
                        but the current index is not updated with the value of these
                        <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_COLOR_4</code></span></dt><dd><p>
                        Each control point is four floating-point values representing
                        red, green, blue, and alpha.
                        Internal <a class="citerefentry" href="glColor4.xml"><span class="citerefentry"><span class="refentrytitle">glColor4</span></span></a> commands are generated when the map is
                        evaluated but the current color is not updated with the value of
                        these <a class="citerefentry" href="glColor4.xml"><span class="citerefentry"><span class="refentrytitle">glColor4</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_NORMAL</code></span></dt><dd><p>
                        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 mathvariant="italic">x</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>,
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>
                        components of a normal vector.
                        Internal <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a> commands are generated when the map is
                        evaluated but the current normal is not updated with the value of
                        these <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_TEXTURE_COORD_1</code></span></dt><dd><p>
                        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 mathvariant="italic">s</mml:mi></mml:math>
                        texture coordinate.
                        Internal
                        <a class="citerefentry" href="glTexCoord1.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord1</span></span></a> commands are generated when the map is evaluated but
                        the current texture coordinates are not updated with the value
                        of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_TEXTURE_COORD_2</code></span></dt><dd><p>
                        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 mathvariant="italic">s</mml:mi></mml:math>
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math>
                        texture coordinates.
                        Internal
                        <a class="citerefentry" href="glTexCoord2.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord2</span></span></a> commands are generated when the map is evaluated but
                        the current texture coordinates are not updated with the value
                        of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_TEXTURE_COORD_3</code></span></dt><dd><p>
                        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 mathvariant="italic">s</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math>,
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">r</mml:mi></mml:math>
                        texture coordinates.
                        Internal <a class="citerefentry" href="glTexCoord3.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord3</span></span></a> commands are generated when the map is
                        evaluated but the current texture coordinates are not updated with the value
                        of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands.
                    </p></dd><dt><span class="term"><code class="constant">GL_MAP2_TEXTURE_COORD_4</code></span></dt><dd><p>
                        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 mathvariant="italic">s</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math>, 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">r</mml:mi></mml:math>,
                        and 
                        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">q</mml:mi></mml:math>
                        texture coordinates.
                        Internal
                        <a class="citerefentry" href="glTexCoord4.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord4</span></span></a> commands are generated when the map is evaluated but the current texture coordinates are not updated with the value
                        of these <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands.
                    </p></dd></dl></div><p>
            <em class="parameter"><code>ustride</code></em>,
            <em class="parameter"><code>uorder</code></em>,
            <em class="parameter"><code>vstride</code></em>,
            <em class="parameter"><code>vorder</code></em>, and
            <em class="parameter"><code>points</code></em> define the array addressing for accessing the control points.
            <em class="parameter"><code>points</code></em> 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 mathvariant="italic">uorder</mml:mi>
                    <mml:mo>×</mml:mo>
                    <mml:mi mathvariant="italic">vorder</mml:mi>
                </mml:mrow>
            </mml:math>
            control points in the array.
            <em class="parameter"><code>ustride</code></em> 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 mathvariant="italic">R</mml:mi>
                <mml:mfenced open="" close="">
                    <mml:mrow>
                        <mml:mi mathvariant="italic">i</mml:mi>
                        <mml:mo>⁢</mml:mo>
                        <mml:mi mathvariant="italic">j</mml:mi>
                    </mml:mrow>
                </mml:mfenced>
                </mml:msub>
            </mml:math>
            to control point 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
                <mml:mfenced open="" close="">
                    <mml:mrow>
                        <mml:mfenced open="(" close=")">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">i</mml:mi>
                                <mml:mo>+</mml:mo>
                                <mml:mn>1</mml:mn>
                            </mml:mrow>
                        </mml:mfenced>
                        <mml:mo>⁢</mml:mo>
                        <mml:mi mathvariant="italic">j</mml:mi>
                    </mml:mrow>
                </mml:mfenced>
                </mml:msub>
            </mml:math>.
            <em class="parameter"><code>vstride</code></em> 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 mathvariant="italic">R</mml:mi>
                <mml:mfenced open="" close="">
                    <mml:mrow>
                        <mml:mi mathvariant="italic">i</mml:mi>
                        <mml:mo>⁢</mml:mo>
                        <mml:mi mathvariant="italic">j</mml:mi>
                    </mml:mrow>
                </mml:mfenced>
                </mml:msub>
            </mml:math>
            to control point 
            <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                
                <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
                <mml:mfenced open="" close="">
                    <mml:mrow>
                        <mml:mi mathvariant="italic">i</mml:mi>
                        <mml:mo>⁡</mml:mo>
                        <mml:mfenced open="(" close=")">
                            <mml:mrow>
                                <mml:mi mathvariant="italic">j</mml:mi>
                                <mml:mo>+</mml:mo>
                                <mml:mn>1</mml:mn>
                            </mml:mrow>
                        </mml:mfenced>
                    </mml:mrow>
                </mml:mfenced>
                </mml:msub>
            </mml:math>.
        </p></div><div class="refsect1"><a id="notes"></a><h2>Notes</h2><p>
            As is the case with all GL commands that accept pointers to data,
            it is as if the contents of <em class="parameter"><code>points</code></em> were copied by <code class="function">glMap2</code> before <code class="function">glMap2</code>
            returns.
            Changes to the contents of <em class="parameter"><code>points</code></em> have no effect after <code class="function">glMap2</code> is called.
        </p><p>
            Initially, <code class="constant">GL_AUTO_NORMAL</code> is enabled. If <code class="constant">GL_AUTO_NORMAL</code> is enabled,
            normal vectors are generated when either
            <code class="constant">GL_MAP2_VERTEX_3</code> or <code class="constant">GL_MAP2_VERTEX_4</code> is used to generate
            vertices.
        </p></div><div class="refsect1"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not an accepted value.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>u1</code></em> is equal to <em class="parameter"><code>u2</code></em>,
            or if <em class="parameter"><code>v1</code></em> is equal to <em class="parameter"><code>v2</code></em>.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if either <em class="parameter"><code>ustride</code></em> or <em class="parameter"><code>vstride</code></em>
            is less than the number of values in a control point.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if either <em class="parameter"><code>uorder</code></em> or <em class="parameter"><code>vorder</code></em>
            is less than 1 or greater than the return value of <code class="constant">GL_MAX_EVAL_ORDER</code>.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMap2</code>
            is executed between the execution of
            <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
            and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMap2</code> is called and the value
            of <code class="constant">GL_ACTIVE_TEXTURE</code> is not <code class="constant">GL_TEXTURE0</code>.
        </p></div><div class="refsect1"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
            <a class="citerefentry" href="glGetMap.xml"><span class="citerefentry"><span class="refentrytitle">glGetMap</span></span></a>
        </p><p>
            <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_EVAL_ORDER</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_VERTEX_3</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_VERTEX_4</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_INDEX</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_COLOR_4</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_NORMAL</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_1</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_2</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_3</code>
        </p><p>
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_4</code>
        </p></div><div class="refsect1"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>,
            <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a>,
            <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
            <a class="citerefentry" href="glEvalCoord.xml"><span class="citerefentry"><span class="refentrytitle">glEvalCoord</span></span></a>,
            <a class="citerefentry" href="glEvalMesh.xml"><span class="citerefentry"><span class="refentrytitle">glEvalMesh</span></span></a>,
            <a class="citerefentry" href="glEvalPoint.xml"><span class="citerefentry"><span class="refentrytitle">glEvalPoint</span></span></a>,
            <a class="citerefentry" href="glMap1.xml"><span class="citerefentry"><span class="refentrytitle">glMap1</span></span></a>,
            <a class="citerefentry" href="glMapGrid.xml"><span class="citerefentry"><span class="refentrytitle">glMapGrid</span></span></a>,
            <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>,
            <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>,
            <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a>
        </p></div><div class="refsect1"><a id="Copyright"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>