![]() |
citro3d
|
Configure vertex array buffers. More...
#include "types.h"Go to the source code of this file.
Data Structures | |
| struct | C3D_BufCfg |
| Vertex buffer config. More... | |
| struct | C3D_BufInfo |
| Vertex buffer info. More... | |
Functions | |
| void | BufInfo_Init (C3D_BufInfo *info) |
| Resets and initializes C3D_BufInfo structure to default values. | |
| int | BufInfo_Add (C3D_BufInfo *info, const void *data, ptrdiff_t stride, int attribCount, u64 permutation) |
| Adds a buffer to the vertex buffer info struct. | |
| C3D_BufInfo * | C3D_GetBufInfo (void) |
| Gets pointer to the global C3D_BufInfo structure. | |
| void | C3D_SetBufInfo (C3D_BufInfo *info) |
| Sets global C3D_BufInfo structure. Copies values from the specified C3D_BufInfo structure to the global C3D_BufInfo structure. | |
Configure vertex array buffers.
| int BufInfo_Add | ( | C3D_BufInfo * | info, |
| const void * | data, | ||
| ptrdiff_t | stride, | ||
| int | attribCount, | ||
| u64 | permutation | ||
| ) |
Adds a buffer to the vertex buffer info struct.
permutation should be the same as the ones returned by AttrInfo_AddLoader() | [out] | info | Pointer to a C3D_BufInfo struct. |
| [in] | data | Pointer to buffer. |
| [in] | stride | Distance in bytes between vertex entries in the buffer (usually set to the size of the vertex structure). |
| [in] | attribCount | Number of attributes to load from this buffer. |
| [in] | permutation | Specifies the order of attributes in the buffer. Each attribute index is a nibble (4 bits), and they are ordered from least significant to most significant. Padding can be specified with 0xC, 0xD, 0xE and 0xF. (See https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_ATTRIBBUFFERi_CONFIG1 for more info) |
| void BufInfo_Init | ( | C3D_BufInfo * | info | ) |
Resets and initializes C3D_BufInfo structure to default values.
| [out] | info | Pointer to vertex buffer info structure. |
| C3D_BufInfo * C3D_GetBufInfo | ( | void | ) |
Gets pointer to the global C3D_BufInfo structure.
| void C3D_SetBufInfo | ( | C3D_BufInfo * | info | ) |
Sets global C3D_BufInfo structure. Copies values from the specified C3D_BufInfo structure to the global C3D_BufInfo structure.
| [in] | info | Pointer to user C3D_BufInfo. |