<?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>gluBeginSurface</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.07 Man Pages"/><link rel="up" href="reference-GLU.xml" title="GLU"/><link rel="previous" href="gluBeginPolygon.3G.xml" title="gluBeginPolygon"/><link rel="next" href="gluBeginTrim.3G.xml" title="gluBeginTrim"/></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">gluBeginSurface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gluBeginPolygon.3G.xml">Prev</a> </td><th width="60%" align="center">GLU</th><td width="20%" align="right"> <a accesskey="n" href="gluBeginTrim.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="gluBeginSurface.3G"/><div class="titlepage"/><div class="refnamediv"><a name="gluBeginSurface.3G-name"/><h2>Name</h2><p>gluBeginSurface, gluEndSurface &#8212; delimit a NURBS surface definition</p></div><div class="refsynopsisdiv"><a name="gluBeginSurface.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>gluBeginSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLUnurbs* <i><tt>nurb</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>gluEndSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLUnurbs* <i><tt>nurb</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="gluBeginSurface.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>gluBeginSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nurb</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>gluEndSurface</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nurb</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="gluBeginSurface.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>nurb</tt></i></span></dt><dd>
						Specifies the NURBS object (created with <a href="gluNewNurbsRenderer.3G.xml"><tt>gluNewNurbsRenderer</tt></a>).
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="gluBeginSurface.3G-description"/><h2>Description</h2><p>
			Use <tt>gluBeginSurface</tt> to mark the beginning of a NURBS surface definition. After calling
			<tt>gluBeginSurface</tt>, make one or more calls to <a href="gluNurbsSurface.3G.xml"><tt>gluNurbsSurface</tt></a> to define the attributes of the surface. Exactly one of these calls to
			<a href="gluNurbsSurface.3G.xml"><tt>gluNurbsSurface</tt></a> must have a surface type of
			<tt>GL_MAP2_VERTEX_3</tt> or <tt>GL_MAP2_VERTEX_4</tt>. To mark the end of the NURBS surface
			definition, call <tt>gluEndSurface</tt>.
		</p><p>
			Trimming of NURBS surfaces is supported with <a href="gluBeginTrim.3G.xml"><tt>gluBeginTrim</tt></a>, <a href="gluPwlCurve.3G.xml"><tt>gluPwlCurve</tt></a>, <a href="gluNurbsCurve.3G.xml"><tt>gluNurbsCurve</tt></a>, and <a href="gluBeginTrim.3G.xml"><tt>gluEndTrim</tt></a>. See the <a href="gluBeginTrim.3G.xml"><tt>gluBeginTrim</tt></a> reference page
			for details.
		</p><p>
			GL evaluators are used to render the NURBS surface as a set of polygons. Evaluator state is preserved during rendering
			with <a href="glPushAttrib.3G.xml"><tt>glPushAttrib</tt></a>(<tt>GL_EVAL_BIT</tt>) and <a href="glPushAttrib.3G.xml"><tt>glPopAttrib</tt></a>(). See the <a href="glPushAttrib.3G.xml"><tt>glPushAttrib</tt></a> reference
			page for details on exactly what state these calls preserve.
		</p></div><div class="refsect1" lang="en"><a name="gluBeginSurface.3G-example"/><h2>Example</h2><p>
			The following commands render a textured NURBS surface with normals; the texture coordinates and normals are also
			described as NURBS surfaces:
		</p><pre class="programlisting">gluBeginSurface(nobj);
gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);</pre></div><div class="refsect1" lang="en"><a name="gluBeginSurface.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="gluBeginCurve.3G.xml">gluBeginCurve</a>, <a href="gluBeginTrim.3G.xml">gluBeginTrim</a>, <a href="gluNewNurbsRenderer.3G.xml">gluNewNurbsRenderer</a>, <a href="gluNurbsCurve.3G.xml">gluNurbsCurve</a>, <a href="gluNurbsSurface.3G.xml">gluNurbsSurface</a>, <a href="gluPwlCurve.3G.xml">gluPwlCurve</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="gluBeginPolygon.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLU.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gluBeginTrim.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gluBeginPolygon </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> gluBeginTrim</td></tr></table></div></body></html>