mmode(3G) mmode(3G)
mmode  sets the current matrix mode
void mmode(m)
short m;
m expects a symbolic constant, one of:
MSINGLE puts the system into singlematrix mode. In singlematrix
mode, all modeling, viewing, and projection transformations are done
using a single matrix that combines all these transformations. This
is the default matrix mode.
MVIEWING puts the system into multimatrix mode. In this mode,
separate ModelView, Projection, and Texture matrices are maintained.
The ModelView matrix is modified by all matrix operations, except for
perspective, ortho, ortho2, and window which always replace the
current Projection matrix.
MPROJECTION puts the system into multimatrix mode. In this mode,
separate ModelView, Projection, and Texture matrices are maintained.
The Projection matrix is modified by all matrix operations.
MTEXTURE puts the system into multimatrix mode. In this mode,
separate ModelView, Projection, and Texture matrices are maintained.
The Texture matrix is modified by all matrix operations, except for
perspective, ortho, ortho2, and window which always replace the
current Projection matrix.
mmode specifies which matrix is the current matrix, and also determines
whether the system is in singlematrix mode, or in multimatrix mode.
The matrix mode and current matrix are determined as follows:
____________________________________________
 mmode matrix mode current matrix 
___________________________________________
 MSINGLE single only matrix 
 MVIEWING multi ModelView 
MPROJECTION multi Projection 
 MTEXTURE multi Texture 
___________________________________________
In singlematrix mode, vertices are transformed directly from objectcoordinates
to clipcoordinates by a single matrix. All matrix commands
operate on this, the only matrix. Singlematrix mode is the default
mode, but its use is discouraged, because many of the newer GL rendering
features cannot be used while the system is in singlematrix mode.
Page 1
mmode(3G) mmode(3G)
In multimatrix mode, vertices are transformed from objectcoordinates to
eyecoordinates by the ModelView matrix, then from eyecoordinates to
clipcoordinates by the Projection matrix. A third matrix, the Texture
matrix, is maintained to transform texture coordinates. While in multimatrix
mode, mmodes MVIEWING, MPROJECTION, and MTEXTURE specify which of
the three matrices is operated on by matrix modification commands. Many
GL rendering operations, including lighting, texture mapping, and userdefined
clipping planes, require that the matrix mode be multimatrix.
Both the single matrix that is maintained while mmode is MSINGLE mode,
and the ModelView matrix that is maintained while not in MSINGLE mode,
have a stack depth of 32. The Projection and Texture matrices are not
stacked. Thus matrix commands pushmatrix and popmatrix should not be
called while the matrix mode is MPROJECTION or MTEXTURE.
Changes between matrix modes MVIEWING, MPROJECTION and MTEXTURE have no
effect on the matrix values themselves. However, when matrix mode
MSINGLE is entered or left, all matrix stacks are forced to be empty, and
all matrices are initialized to the identity matrix.
clipplane, getmmode, lmbind, lookat, ortho, perspective, polarview, rot,
rotate, scale, texbind, translate, window
On IRIS4D G, GT, GTX systems, and on the Personal IRIS, multimatrix
operation is incorrect while mmode is MPROJECTION. Specifically,
vertices are transformed only by the Projection matrix, not by the
ModelView matrix.
PPPPaaaaggggeeee 2222 [ Back ]
