grHints() informs Glide of special conditions regarding optimizations and operation. Each hintType controls a different optimization or mode of operation. The GR_HINT_STWHINT hint type controls stw parameter optimization and specifies Glide’s source for the parameter values. Hints of a given type are ORed together into a hintMask.
There is an implicit ordering of TMUs within Glide, starting with TMU0, followed by TMU1, and TMU2. By default, Glide reads sow and tow values from the GrVertex structure for the first TMU that is active. Whenever s and t coordinates are read, they are transmitted to all subsequent TMUs. For example, if texturing is active in TMU1 but not active in TMU0, then sow and towvalues are read from tmuvtx[1] and broadcast to TMU1 and TMU2. Once sow and tow values are read, they will not be read again unless a hint is specified. If one of the subsequent units has a unique or different parameter value, then a hint must be used. If a hint is specified, the parameter value will be read again and sent to the specified unit and all other units following it.
Hints are also used to help Glide find w coordinates. The rule for the w coordinate is very simple: the w coordinate is read from the GrVertex structure and broadcast to all TMUs unless a w hint is specified. If a whint is specified and if w buffering or table-based fog is enabled, then tmuvtx[].oow structure corresponding to the TMU mentioned in hintMask is read and broadcast to all subsequent TMUs.
The hintMask for GR_HINT_STWHINT hints is created by ORing together the stw hints that are shown in Table Texture Mapping.1.
Table Texture Mapping.1 The stw hints.
The grHints() function alerts Glide to situations that differ from the norm. The stw hints indicate that the sow, tow, and oow values in the tmuvtx arrays are not the same as the ones in the GrVertex itself. A hintMask is composed by ORing together a collection of the hints listed below.