EZ_DefineLightModel(3) EZWGL Functions EZ_DefineLightModel(3)NAME
EZ_DefineLightModel, EZ_BindLightModel - define a lighting model
SYNOPSIS
#include <EZ.h>
EZ_LightModel *EZ_DefineLightModel(float *parameters)
void EZ_BindLightModel(EZ_LightModel *lmodel)
ARGUMENTS
parameters Specifies material properties.
lmodel Specifies a pre-defined lighting model.
DESCRIPTIONEZ_DefineLightModel defines a lighting model based on the specified
parameters. The defined lighting model can later be bind the current
lighting model.
parameters specifies an array of floating point symbols and values that
defines the lighting model properties. parameters must contain a
sequence of lighting symbols, each followed by the appropriate number
of floating point values. The last symbol must be EZ_NULL_F, which is
itself not followed by any values.
The symbols are:
EZ_LIGHT_MODEL_AMBIENT_F specifies the ambient color of the lighting
model, Must followed by 4 floats in the range [0.0, 1.0] that spec‐
ify the intensity of the RGBA components of the ambient color.
EZ_LIGHT_MODEL_LOCAL_VIEWER_F specifies whether reflection calcula‐
tions are done based on a local or infinitely distant viewpoint. It
must be followed by a single floating point value, which must be
either 0.0 or 1.0.
EZ_LIGHT_MODEL_TWO_SIDE_F specifies whether lighting calculations
are done assuming that only frontfacing polygons are visible, or are
corrected for each polygon based on whether it is frontfacing or
backfacing. It must be followed by a single floating point value,
which must be either 0.0 or 1.0. The value 1.0 specifies a lighting
model that is correct for both frontfacing and backfacing polygons.
In this case, vertex normals are reversed for all vertices of back‐
facing polygons and the back-material is used to color backfacing
polygons.
EZ_BindLightModel binds the specified pre-defined lighting model to the
current lighting model.
SEE ALSOEZ_DefineLightSrc(3), EZ_DefineMaterial(3), EZ_BindLightSrc(3),
EZ_BindMaterial(3)EZWGLEZ_DefineLightModel(3)