NNSG2dOamExEntryFunctions

Structure Definitions

typedef struct NNSG2dOamExEntryFunctions
{
    NNSG2dGetOamCpacityFuncPtr        getOamCapacity;
    NNSG2dGetOamCpacityFuncPtr        getAffineCapacity;
    NNSG2dEntryNewOamFuncPtr          entryNewOam;
    NNSG2dEntryNewOamAffineFuncPtr    entryNewAffine;
    
}NNSG2dOamExEntryFunctions;

typedef u16     (*NNSG2dGetOamCpacityFuncPtr)(); 
typedef u16     (*NNSG2dGetOamAffineCpacityFuncPtr)(); 
typedef BOOL    (*NNSG2dEntryNewOamFuncPtr)( const GXOamAttr* pOam, u16 index ); 
typedef u16     (*NNSG2dEntryNewOamAffineFuncPtr)( const MtxFx22* mtx, u16 index ); 

NNSG2dOamExEntryFunctions.getOamCapacity

Pointer to a function that can use the Extended OAM Manager and get the number of OAM attributes.

The function in question returns the number of OAM attributes. This returned value represents the number of OAM attributes that can actually be loaded in the hardware OAM.

Note: this differs from the number of OAM chunks (numPooledOam), which is given as a parameter when the Extended OAM Manager is initialized.

If the registered number of chunks is greater than the value returned by getOamCapacity(), the Extended OAM Manager displays the registered OBJs over multiple frames using time-sharing.

NNSG2dOamExEntryFunctions.getAffineCapacity

Pointer to a function that can use the Extended OAM Manager and get the number of OAM affine parameters.
If the Extended OAM Manager does not manage affine parameters, you can set this to NULL.

If the registered number of affine parameters is greater than the value returned by getAffineCapacity(), the Extended OAM Manager loads the registered affine parameters over multiple frames using time-sharing, and displays the OBJs that are using affine parameters.

NNSG2dOamExEntryFunctions.entryNewOam

Pointer to the function that registers OAM attributes.
It takes the OAM attribute and the OAM attribute number as arguments. The OAM attribute number index is equal to the number of times that entryNewOam has been called.
Bear in mind, if the OAM manager supplied with G2d is used for implementing entryNewOam, the index parameter is not used.

Example of implementation using OAM manager

static u16 OamMgrExCBEntryOamAffine_( const MtxFx22* pMtx, u16 index )
{
#pragma unused( index )
return NNS_G2dEntryOamManagerAffine( &myOamMgr_, pMtx );
}

Example of implementation where OAM manager is not used

static BOOL CallBackEntryNewOam(const GXOamAttr* pOam, u16 index)
{
    const u32 szByte = sizeof( GXOamAttr );

    DC_FlushRange( (void*)pOam, szByte );
    GX_LoadOAM( pOam, index * szByte, szByte );

    return TRUE;
}

NNSG2dOamExEntryFunctions.entryNewAffine

Pointer to the function that registers OAM affine parameters. The function takes the matrix storing the affine parameter and the affine parameter number as arguments. If the Extended OAM Manager does not manage affine parameters, you can set this to NULL.
As with entryNewOam, the affine parameter number index is equal to the number of times that entryNewAffine has been called.

Example of implementation using OAM manager

static u16 OamMgrExCBEntryOamAffine_( const MtxFx22* pMtx, u16 index )
{
#pragma unused( index )
return NNS_G2dEntryOamManagerAffine( &myOamMgr_, pMtx );
}

See Also

NNS_G2dSetOamManExEntryFunctions, NNS_G2dGetOamManExInstance

Revision History

2005/06/06 Initial version.


CONFIDENTIAL