citro3d
Data Structures | Functions
attribs.h File Reference

Configure vertex attributes. More...

#include "types.h"

Go to the source code of this file.

Data Structures

struct  C3D_AttrInfo
 Vertex attribute info. More...
 

Functions

void AttrInfo_Init (C3D_AttrInfo *info)
 Resets and initializes C3D_AttrInfo structure to default values. More...
 
int AttrInfo_AddLoader (C3D_AttrInfo *info, int regId, GPU_FORMATS format, int count)
 Defines an array of vertex attribute data. More...
 
int AttrInfo_AddFixed (C3D_AttrInfo *info, int regId)
 Defines a fixed vertex attribute. More...
 
C3D_AttrInfoC3D_GetAttrInfo (void)
 Gets pointer to the global C3D_AttrInfo structure. More...
 
void C3D_SetAttrInfo (C3D_AttrInfo *info)
 Sets global C3D_AttrInfo structure. Copies values from the specified C3D_AttrInfo structure to the global C3D_AttrInfo structure. More...
 

Detailed Description

Configure vertex attributes.

Function Documentation

◆ AttrInfo_AddFixed()

int AttrInfo_AddFixed ( C3D_AttrInfo info,
int  regId 
)

Defines a fixed vertex attribute.

Note
The attribute index returned should be the same as the order used when specifying AttrInfo_AddLoader() and AttrInfo_AddFixed().
Parameters
[out]infoAttribute info structure.
[in]regIdSpecifies the attribute register in the vertex shader that will be modified.
Returns
Attribute index if successful, negative value on failure.

◆ AttrInfo_AddLoader()

int AttrInfo_AddLoader ( C3D_AttrInfo info,
int  regId,
GPU_FORMATS  format,
int  count 
)

Defines an array of vertex attribute data.

Note
The attribute index returned should be the same as the order used when specifying AttrInfo_AddLoader() and AttrInfo_AddFixed().
Parameters
[out]infoAttribute info structure.
[in]regIdSpecifies the attribute register in the vertex shader that will be modified.
[in]formatSpecifies the data type of the array.
[in]countSpecifies the length of the array.
Returns
Attribute index if successful, negative value on failure.

◆ AttrInfo_Init()

void AttrInfo_Init ( C3D_AttrInfo info)

Resets and initializes C3D_AttrInfo structure to default values.

Parameters
[out]infoPointer to attribute info structure.

◆ C3D_GetAttrInfo()

C3D_AttrInfo* C3D_GetAttrInfo ( void  )

Gets pointer to the global C3D_AttrInfo structure.

Returns
Pointer to global C3D_AttrInfo. This should not be freed.

◆ C3D_SetAttrInfo()

void C3D_SetAttrInfo ( C3D_AttrInfo info)

Sets global C3D_AttrInfo structure. Copies values from the specified C3D_AttrInfo structure to the global C3D_AttrInfo structure.

Parameters
[in]infoPointer to user C3D_AttrInfo.