<?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>gluTessVertex</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="gluTessProperty.3G.xml" title="gluTessProperty"/><link rel="next" href="gluUnProject.3G.xml" title="gluUnProject"/></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">gluTessVertex</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gluTessProperty.3G.xml">Prev</a> </td><th width="60%" align="center">GLU</th><td width="20%" align="right"> <a accesskey="n" href="gluUnProject.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="gluTessVertex.3G"/><div class="titlepage"/><div class="refnamediv"><a name="gluTessVertex.3G-name"/><h2>Name</h2><p>gluTessVertex &#8212; specify a vertex on a polygon</p></div><div class="refsynopsisdiv"><a name="gluTessVertex.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>gluTessVertex</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLUtesselator* <i><tt>tess</tt></i>, GLdouble *<i><tt>location</tt></i>, GLvoid* <i><tt>data</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="gluTessVertex.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>gluTessVertex</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>tess</tt></i>, <i><tt>location</tt></i>, <i><tt>data</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="gluTessVertex.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>tess</tt></i></span></dt><dd>
						Specifies the tessellation object (created with <a href="gluNewTess.3G.xml"><tt>gluNewTess</tt></a>).
					</dd><dt><span class="term"><i><tt>location</tt></i></span></dt><dd>
						Specifies the location of the vertex.
					</dd><dt><span class="term"><i><tt>data</tt></i></span></dt><dd>
						Specifies an opaque pointer passed back to the program with the vertex callback (as specified by <a href="gluTessCallback.3G.xml"><tt>gluTessCallback</tt></a>).
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="gluTessVertex.3G-description"/><h2>Description</h2><p>
			<tt>gluTessVertex</tt> describes a vertex on a polygon that the program defines. Successive
			<tt>gluTessVertex</tt> calls describe a closed contour. For example, to describe a quadrilateral
			<tt>gluTessVertex</tt> should be called four times. <tt>gluTessVertex</tt> can only be called
			between <a href="gluTessBeginContour.3G.xml"><tt>gluTessBeginContour</tt></a> and <a href="gluTessBeginContour.3G.xml"><tt>gluTessEndContour</tt></a>.
		</p><p>
			<i><tt>data</tt></i> normally points to a structure containing the vertex location, as well as other per-vertex
			attributes such as color and normal. This pointer is passed back to the user through the
			<tt>GLU_TESS_VERTEX</tt> or <tt>GLU_TESS_VERTEX_DATA</tt> callback after tessellation (see the
			<a href="gluTessCallback.3G.xml"><tt>gluTessCallback</tt></a> reference page).
		</p></div><div class="refsect1" lang="en"><a name="gluTessVertex.3G-example"/><h2>Example</h2><p>
			A quadrilateral with a triangular hole in it can be described as follows: gluTessBeginPolygon(tobj,
			<tt>NULL</tt>); gluTessBeginContour(tobj); gluTessVertex(tobj, v1, v1); gluTessVertex(tobj, v2, v2);
			gluTessVertex(tobj, v3, v3); gluTessVertex(tobj, v4, v4); gluTessEndContour(tobj); gluTessBeginContour(tobj);
			gluTessVertex(tobj, v5, v5); gluTessVertex(tobj, v6, v6); gluTessVertex(tobj, v7, v7); gluTessEndContour(tobj);
			gluTessEndPolygon(tobj);
		</p></div><div class="refsect1" lang="en"><a name="gluTessVertex.3G-notes"/><h2>Notes</h2><p>
			It is a common error to use a local variable for <i><tt>location</tt></i> or <i><tt>data</tt></i> and
			store values into it as part of a loop. For example: for (i = 0; i &lt; NVERTICES; ++i) { GLdouble data[3]; data[0] =
			vertex[i][0]; data[1] = vertex[i][1]; data[2] = vertex[i][2]; gluTessVertex(tobj, data, data); }
		</p><p>
			This doesn't work. Because the pointers specified by <i><tt>location</tt></i> and <i><tt>data</tt></i>
			might not be dereferenced until <a href="gluTessEndPolygon.3G.xml"><tt>gluTessEndPolygon</tt></a> is executed, all the vertex
			coordinates but the very last set could be overwritten before tessellation begins.
		</p><p>
			Two common symptoms of this problem are consists of a single point (when a local variable is used for
			<i><tt>data</tt></i>) and a <tt>GLU_TESS_NEED_COMBINE_CALLBACK</tt> error (when a local variable is
			used for <i><tt>location</tt></i>).
		</p></div><div class="refsect1" lang="en"><a name="gluTessVertex.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="gluTessBeginPolygon.3G.xml">gluTessBeginPolygon</a>, <a href="gluNewTess.3G.xml">gluNewTess</a>, <a href="gluTessBeginContour.3G.xml">gluTessBeginContour</a>, <a href="gluTessCallback.3G.xml">gluTessCallback</a>, <a href="gluTessProperty.3G.xml">gluTessProperty</a>, <a href="gluTessNormal.3G.xml">gluTessNormal</a>, <a href="gluTessEndPolygon.3G.xml">gluTessEndPolygon</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="gluTessProperty.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="gluUnProject.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gluTessProperty </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> gluUnProject</td></tr></table></div></body></html>