vertex_normal

This function adds normal data to the vertex currently being defined for the custom primitive.

You supply the vertex buffer to write the data into as well as the x, y and z components of the normal.

 

Syntax:

vertex_normal(buffer, nx, ny, nz);

ArgumentTypeDescription
bufferVertex BufferThe vertex buffer to write the information to.
nxRealThe x component of the normal.
nyRealThe y component of the normal.
nzRealThe z component of the normal.

 

Returns:

N/A

 

Example:

vertex_normal(buff, 0, 1, 1);

The above code will set the surface normal of the vertex being defined.