n3f(3G) n3f(3G)
n3f - specifies a normal
void n3f(float vector[3])
vector expects the address of an array containing three floating point
numbers. These numbers are used to set the value for the
current vertex normal.
n3f specifies a floating point normal for lighting calculations. The
normal becomes the current normal for subsequent vertices; it is not
necessary to respecify a normal if it is unchanged (e.g., a single call
to n3f specifies normals for all vertices of a flat- shaded polygon).
Vector components are Nx, Ny, and Nz for indices 0, 1, and 2.
Lighting calculations assume that the specified normal is of unit length.
If non-unit-length normals are to be specified, use nmode (NNORMALIZE) to
inform the system that non-unit-length normals must be normalized.
Lighting performance may be reduced in this event.
When called with unequal arguments, scale causes the ModelView matrix to
become non-orthonormal. In this case, or in any other case that results
in a non-orthonormal ModelView matrix, normals are also renormalized
automatically by default, as specified by nmode (NAUTO). Performance
reduction, if any, matches that of nmode (NNORMALIZE).
lmbind, lmdef, nmode
On the IRIS-4D/120GTX and IRIS-4D/140GTX, there is problem with the
graphics DMA hardware that can cause data to be sent to the hardware
after the subroutine call has returned. If the data is modified
immediately after the subroutine call, the modified data may get sent
down. To avoid this, don't modify the data until after another n, v, or
c call has been made.
This is an example of the bug:
vertex[2] = 1.0;
v3f(vertex); /* 4D/1x0 GTX hardware may receive 3.0 for the z value */
vertex[2] = 3.0;
v3f(vertex);
This is one way to work around the problem:
Page 1
n3f(3G) n3f(3G)
vertexA[2] = 1.0;
v3f(vertexA);
vertexB[2] = 3.0;
v3f(vertexB);
PPPPaaaaggggeeee 2222 [ Back ]
|