kmuGeneratePassTable
Generates Multipass VERTEXCONTEXT Automatically
Description:
This function generates the context for each pass of the multipass process (Trilinear) according to the rendering specification (context) set by the user.
A multipass process requires that VERTEXCONTEXT be set (when a trilinear filter is used). This function automatically generates VERTEXCONTEXT to relieve the user from the task of
setting it for individual passes.
When a trilinear filter is used in pVertexContext, specifying a VERTEXCONTEXT value for pass 1 generates the VERTEXCONTEXT required for each pass according to the specified value. (The opaque polygon uses a two-pass process, while the transparent polygon uses a three-pass process.) When a trilinear filter is used for the transparent polygon, the blending mode for pass 3 can be set to any value. However, this function sets the blending mode as follows:
SRCBlendingMode | = KM_SRCALPHA |
DSTBlendingMode | = KM_INVSRCALPHA |
Parameters:
pVertexContext(input)
This parameter is a pointer to the context for specifying rendering conditions.
nNumContext(input)
This parameter specifies the number of entries (passes) in the prepared pVertexContextTable.
If the specified value is smaller than the number of actually required passes,
KMU_PASS_ERROR_VERTEXCONTEXT_PASS is returned.
In this case, the function ends only by setting the number of required passes in pPass.
ppVertexContextTable(output)
This parameter specifies a pointer to an array of pointers to VERTEXCONTEXT where the generated multipass context is to be received.
If NULL is specified in this argument, only the number of required passes is returned to pPass.
pPass(output)
KAMUI returns the number of multipasses required in the specified rendering to this parameter.
Return values:
Value | Explanation |
---|---|
KMU_PASS_OK | Success |
KMU_PASS_ERROR_VERTEXCONTEXT | Invalid (NULL) VERTEXCONTEXT |
KMU_PASS_ERROR_VERTEXCONTEXT_PASS | The number of specified passes is insufficient. |
kmuGeneratePassTable