#include <nnsys/g3d/kernel.h> typedef struct NNSG3dRenderObj_ { u32 flag; // NNSG3dRenderObjFlag NNSG3dResMdl* resMdl; NNSG3dAnmObj* anmMat; NNSG3dFuncAnmBlendMat funcBlendMat; NNSG3dAnmObj* anmJnt; NNSG3dFuncAnmBlendJnt funcBlendJnt; NNSG3dAnmObj* anmVis; NNSG3dFuncAnmBlendVis funcBlendVis; // Callback information NNSG3dSbcCallBackFunc cbFunc; // No callback if NULL. u8 cbCmd; // Specify the stop position with a command. NNS_G3D_SBC_***** (Define in res_struct.h). u8 cbTiming; // NNSG3dSbcCallBackTiming (Define in sbc.h). u16 dummy_; // Called immediately before the rendering begins. Generally used to set // the callback vectors for NNS_G3dRS. NNSG3dSbcCallBackFunc cbInitFunc; // Pointer to the region managed by the user. // If the pointer is set in advance, it can be used in the callback. void* ptrUser; u8* ptrUserSbc; struct NNSG3dJntAnmResult_* recJntAnm; struct NNSG3dMatAnmResult_* recMatAnm; u32 hintMatAnmExist[NNS_G3D_SIZE_MAT_MAX / 32]; u32 hintJntAnmExist[NNS_G3D_SIZE_JNT_MAX / 32]; u32 hintVisAnmExist[NNS_G3D_SIZE_JNT_MAX / 32]; } NNSG3dRenderObj;
The NNSG3dRenderObj
structure collects and stores the data needed to render a model. The structure stores the following data:
NNSG3dResMdl
)
NNSG3dAnmObj
)
NNSG3dJntAnmResult
, NNSG3dMatAnmResult
)
The following processes must be conducted in order to use the NNSG3dRenderObj
structure:
NNS_G3dAllocRenderObj
function (can also allocate to the stack without using this function)
NNS_G3dRenderObjInit
function
NNS_G3dRenderObjAddAnmObj
function
NNS_G3dRenderObjSetCallBack
or NNS_G3dRenderObjSetInitFunc
function
NNSG3dRenderObj
structure using the NNS_G3dRenderObjSetJntAnmBuffer
or NNS_G3dRenderObjSetMatAnmBuffer
function
NNS_G3dDraw
function
NNS_G3dFreeRenderObj
function
You do not need to prepare the NNSG3dRenderObj
structure if you are rendering with the NNS_G3dDraw1Mat1Shp
function.
2007/05/17 Added structure definition.
2004/10/12 Initial version.
CONFIDENTIAL