ent_fixnormals( ENTITY*,var frame)

Recalculates the normal vectors for the given model entity and vertex frame number. Necessary to achieve correct gouraud shading after having modified the mesh by displacing vertices f.i. with ent_setvertex or ent_setmesh.

Parameters:

ENTITY* - entity pointer.
frame - vertex frame number for recalculating normals.

Speed:

Slow

Remarks:

Multi-mesh entities, such as chunked terrain, are not yet supported by this function.

Example:

ent_fixnormals(my,my.frame);

See also:

ent_setvertex, ent_setmesh

► latest version online