<?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>glNormal</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-GL.xml" title="GL"/><link rel="previous" href="glNewList.3G.xml" title="glNewList"/><link rel="next" href="glNormalPointer.3G.xml" title="glNormalPointer"/></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">glNormal</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glNewList.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glNormalPointer.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glNormal.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glNormal.3G-name"/><h2>Name</h2><p>glNormal3b, glNormal3d, glNormal3f, glNormal3i, glNormal3s, glNormal3bv, glNormal3dv, glNormal3fv, glNormal3iv, glNormal3sv &#8212; set the current normal vector</p></div><div class="refsynopsisdiv"><a name="glNormal.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glNormal3b</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLbyte <i><tt>nx</tt></i>, GLbyte <i><tt>ny</tt></i>, GLbyte <i><tt>nz</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3d</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLdouble <i><tt>nx</tt></i>, GLdouble <i><tt>ny</tt></i>, GLdouble <i><tt>nz</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3f</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLfloat <i><tt>nx</tt></i>, GLfloat <i><tt>ny</tt></i>, GLfloat <i><tt>nz</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3i</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLint <i><tt>nx</tt></i>, GLint <i><tt>ny</tt></i>, GLint <i><tt>nz</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3s</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLshort <i><tt>nx</tt></i>, GLshort <i><tt>ny</tt></i>, GLshort <i><tt>nz</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glNormal.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glNormal3b</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nx</tt></i>, <i><tt>ny</tt></i>, <i><tt>nz</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3d</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nx</tt></i>, <i><tt>ny</tt></i>, <i><tt>nz</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3f</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nx</tt></i>, <i><tt>ny</tt></i>, <i><tt>nz</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3i</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nx</tt></i>, <i><tt>ny</tt></i>, <i><tt>nz</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3s</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nx</tt></i>, <i><tt>ny</tt></i>, <i><tt>nz</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glNormal.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>nx</tt></i>, </span><span class="term"><i><tt>ny</tt></i>, </span><span class="term"><i><tt>nz</tt></i></span></dt><dd>
						Specify 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> coordinates of the new current normal. The initial value of the current normal is the
						unit vector, (0, 0, 1).
					</dd></dl></div></div><div class="refsynopsisdiv"><a name="glNormal.3G-c_spec-v"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glNormal3bv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLbyte *<i><tt>v</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3dv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLdouble *<i><tt>v</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3fv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLfloat *<i><tt>v</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3iv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLint *<i><tt>v</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glNormal3sv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const GLshort *<i><tt>v</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glNormal.3G-python_spec-v"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glNormal3bv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>v</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3dv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>v</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3fv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>v</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3iv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>v</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glNormal3sv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>v</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glNormal.3G-parameters-v"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>v</tt></i></span></dt><dd>
						Specifies a pointer to an array of three elements: 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> coordinates of the new current normal.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glNormal.3G-description"/><h2>Description</h2><p>
			The current normal is set to the given coordinates whenever <tt>glNormal</tt> is
			issued. Byte, short, or integer arguments are converted to floating-point with a linear mapping that maps the most
			positive representable integer value to 1.0, and the most negative representable integer value to -1.0.
		</p><p>
			Normals specified with <tt>glNormal</tt> need not have unit length. If
			<tt>GL_NORMALIZE</tt> is enabled, then normals of any length specified with <tt>glNormal</tt> are normalized after transformation. If <tt>GL_RESCALE_NORMAL</tt>
			is enabled, normals are scaled by a scaling factor derived from the modelview matrix.
			<tt>GL_RESCALE_NORMAL</tt> requires that the originally specified normals were of unit length, and that the
			modelview matrix contain only uniform scales for proper results. To enable and disable normalization, call <a href="glEnable.3G.xml"><tt>glEnable</tt></a> and <a href="glEnable.3G.xml"><tt>glDisable</tt></a> with either
			<tt>GL_NORMALIZE</tt> or <tt>GL_RESCALE_NORMAL</tt>. Normalization is initially disabled.
		</p></div><div class="refsect1" lang="en"><a name="glNormal.3G-notes"/><h2>Notes</h2><p>
			The current normal can be updated at any time. In particular, <tt>glNormal</tt> can be
			called between a call to <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding call to <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p></div><div class="refsect1" lang="en"><a name="glNormal.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGet</tt> with argument <tt>GL_CURRENT_NORMAL</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_NORMALIZE</tt>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_RESCALE_NORMAL</tt>
		</p></div><div class="refsect1" lang="en"><a name="glNormal.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="glIndex.3G.xml">glIndex</a>, <a href="glNormalPointer.3G.xml">glNormalPointer</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="glNewList.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="glNormalPointer.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glNewList </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glNormalPointer</td></tr></table></div></body></html>