[BACK]Return to glNormal.xml CVS log [TXT][DIR] Up to [Development] / projects / ogl-sample / main / doc / gles / xml

File: [Development] / projects / ogl-sample / main / doc / gles / xml / glNormal.xml (download)

Revision 1.1, Wed Oct 8 06:06:18 2003 UTC (14 years ago) by ljp
Branch: MAIN
CVS Tags: HEAD


OpenGL ES 1.0 and EGL 1.0 reference manual and man pages (written by
Claude Knaus, based on OpenGL SI man pages).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "DTD/docbook/docbookx.dtd">

<!--
  License Applicability. Except to the extent portions of this file are
  made subject to an alternative license as permitted in the SGI Free
  Software License B, Version 1.1 (the "License"), the contents of this
  file are subject only to the provisions of the License. You may not use
  this file except in compliance with the License. You may obtain a copy
  of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
  Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:

  http://oss.sgi.com/projects/FreeB

  Note that, as provided in the License, the Software is distributed on an
  "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
  DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
  CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
  PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

  Original Code. The Original Code is: OpenGL ES Reference Manual,
  Version 1.0, released September 2003, developed by Silicon Graphics,
  Inc.  The Original Code is Copyright (c) 2003 Silicon Graphics, Inc.
  Copyright in any portions created by third parties is as indicated
  elsewhere herein.  All Rights Reserved.
-->

<refentry id="glNormal">
  <refmeta>
    <refentrytitle>glNormal</refentrytitle>
    <manvolnum>3G</manvolnum>
  </refmeta>

  <refnamediv>
    <refdescriptor>glNormal</refdescriptor>
    <refname>glNormal3f</refname>
    <refname>glNormal3x</refname>
    <refpurpose>set the current normal vector</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>C Specification</title>

    <funcsynopsis>
      <funcprototype>
        <funcdef>void <function>glNormal3f</function></funcdef>
        <paramdef>GLfloat <parameter>nx</parameter></paramdef>
        <paramdef>GLfloat <parameter>ny</parameter></paramdef>
        <paramdef>GLfloat <parameter>nz</parameter></paramdef>
      </funcprototype>
      <funcprototype>
        <funcdef>void <function>glNormal3x</function></funcdef>
        <paramdef>GLfixed <parameter>nx</parameter></paramdef>
        <paramdef>GLfixed <parameter>ny</parameter></paramdef>
        <paramdef>GLfixed <parameter>nz</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term>
        <parameter>nx</parameter>, 
        <parameter>ny</parameter>,
        <parameter>nz</parameter>
        </term>

        <listitem>
          <para>Specify the
          <parameter>x</parameter>,
          <parameter>y</parameter>, and
          <parameter>z</parameter> coordinates of the
          new current normal. The initial value is (0, 0, 1).</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The current normal is set to the given coordinates whenever 
    <function>glNormal</function>
    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.</para>

    <para>Normals specified with <function>glNormal</function>
    need not have unit length. If <constant>GL_NORMALIZE</constant>
    is enabled, then normals of any length specified with 
    <function>glNormal</function>
    are normalized after transformation. If 
    <constant>GL_RESCALE_NORMAL</constant>
    is enabled, normals are scaled by a scaling factor derived from
    the modelview matrix.  <constant>GL_RESCALE_NORMAL</constant>
    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 
    <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and 
    <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
    with either 
    <constant>GL_NORMALIZE</constant> or <constant>GL_RESCALE_NORMAL</constant>.
    Normalization is initially disabled.</para>
  </refsect1>

<!--
  <refsect1>
    <title>Notes</title>

    <para>The current normal can be updated at any time.</para>
  </refsect1>
-->

  <refsect1>
    <title>See Also</title>

    <para>
    <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>, 
    <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, 
    <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>,
    <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry> 
    </para>
  </refsect1>
</refentry>