| Offset (bytes) | Description |
|---|---|
| 0 (when upper 3 bits are 000) | NNS_G3D_SBC_MAT | NNS_G3D_SBCFLG_000 |
| 0 (when upper 3 bits are 001) | NNS_G3D_SBC_MAT | NNS_G3D_SBCFLG_001 |
| 0 (when upper 3 bits are 010) | NNS_G3D_SBC_MAT | NNS_G3D_SBCFLG_010 |
| 1 | The material ID. |
The NNS_G3D_SBC_MAT command gets the material information from the model and animation resources, then sends it to the geometry engine. By default, this command calls the sbc.c NNSi_G3dFuncSbc_MAT function. The following processes are performed inside this function:
NNS_G3dMatAnmResult pointer in pMatAnmResult member in the NNS_G3dRS structure.
A callback. The callback in this position is convenient when substituting the material calculation in the callback function. You can skip processing until the next callback by setting the NNS_G3D_RSFLAG_SKIP flag in the NNS_G3dRS structure in the callback function.
*pMatAnmResult when the material information is static image / animation.
B callback. The callback in this position is convenient when processing the results of the material calculation in the callback function.
C callback. The callback in this position is used when performing some sort of operation after this command finishes.
| Timing for Calling a Callback Function | Usage |
|---|---|
NNS_G3D_SBC_CALLBACK_TIMING_A |
When you want a user program to do the material calculation. |
NNS_G3D_SBC_CALLBACK_TIMING_B |
When you want a user program to manipulate material calculation results. |
NNS_G3D_SBC_CALLBACK_TIMING_C |
When you want to enter some process after this command ends. |
| Option Flag | Operation |
|---|---|
NNS_G3D_SBCFLG_000 |
Does not check the buffer that holds material calculation results. Does not buffer calculation results. |
NNS_G3D_SBCFLG_001 |
Uses material calculation results if they are being buffered. If there is no buffer, calculates, but does not buffer the results. |
NNS_G3D_SBCFLG_010 |
Uses material calculation results if they are being buffered. If there is no buffer, calculates, and buffers the results. |
10/14/2004 Revised description.
08/02/2004 Initial version.
CONFIDENTIAL