citro3d
|
Write to shader uniforms. More...
#include "maths.h"
Go to the source code of this file.
Macros | |
#define | C3D_FVUNIF_COUNT 96 |
#define | C3D_IVUNIF_COUNT 4 |
Functions | |
static C3D_FVec * | C3D_FVUnifWritePtr (GPU_SHADER_TYPE type, int id, int size) |
Provides a writable pointer for a floating-point uniform. More... | |
static C3D_IVec * | C3D_IVUnifWritePtr (GPU_SHADER_TYPE type, int id) |
Provides a writable pointer for an integer uniform. More... | |
static void | C3D_FVUnifMtxNx4 (GPU_SHADER_TYPE type, int id, const C3D_Mtx *mtx, int num) |
Writes an Nx4 matrix to the uniform registers. More... | |
static void | C3D_FVUnifMtx4x4 (GPU_SHADER_TYPE type, int id, const C3D_Mtx *mtx) |
Writes a 4x4 matrix to the uniform registers. More... | |
static void | C3D_FVUnifMtx3x4 (GPU_SHADER_TYPE type, int id, const C3D_Mtx *mtx) |
Writes a 3x4 matrix to the uniform registers. More... | |
static void | C3D_FVUnifMtx2x4 (GPU_SHADER_TYPE type, int id, const C3D_Mtx *mtx) |
Writes a 2x4 matrix to the uniform registers. More... | |
static void | C3D_FVUnifSet (GPU_SHADER_TYPE type, int id, float x, float y, float z, float w) |
Writes a 4-component floating-point vector to the uniform registers. More... | |
static void | C3D_IVUnifSet (GPU_SHADER_TYPE type, int id, int x, int y, int z, int w) |
Writes a 4-component integer vector to the uniform registers. More... | |
static void | C3D_BoolUnifSet (GPU_SHADER_TYPE type, int id, bool value) |
Writes a boolean value to the uniform registers. More... | |
void | C3D_UpdateUniforms (GPU_SHADER_TYPE type) |
Flushes newly-updated uniforms to the uniform registers. More... | |
Variables | |
C3D_FVec | C3D_FVUnif [2][96] |
C3D_IVec | C3D_IVUnif [2][4] |
u16 | C3D_BoolUnifs [2] |
bool | C3D_FVUnifDirty [2][96] |
bool | C3D_IVUnifDirty [2][4] |
bool | C3D_BoolUnifsDirty [2] |
Write to shader uniforms.
|
inlinestatic |
Writes a boolean value to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | value | Boolean value to write. |
|
inlinestatic |
Writes a 2x4 matrix to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | mtx | Matrix to be written. |
|
inlinestatic |
Writes a 3x4 matrix to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | mtx | Matrix to be written. |
|
inlinestatic |
Writes a 4x4 matrix to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | mtx | Matrix to be written. |
|
inlinestatic |
Writes an Nx4 matrix to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | mtx | Matrix to be written. |
[in] | num | Row count of the matrix. |
|
inlinestatic |
Writes a 4-component floating-point vector to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | x | X component of the vector. |
[in] | y | Y component of the vector. |
[in] | z | Z component of the vector. |
[in] | w | W component of the vector. |
|
inlinestatic |
Provides a writable pointer for a floating-point uniform.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | size | Number of registers allocated for this uniform. |
|
inlinestatic |
Writes a 4-component integer vector to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
[in] | x | X component of the vector. |
[in] | y | Y component of the vector. |
[in] | z | Z component of the vector. |
[in] | w | W component of the vector. |
|
inlinestatic |
Provides a writable pointer for an integer uniform.
[in] | type | GPU_SHADER_TYPE of the uniform to be set. |
[in] | id | ID of the uniform (retrievable using libctru's shaderInstanceGetUniformLocation()) |
void C3D_UpdateUniforms | ( | GPU_SHADER_TYPE | type | ) |
Flushes newly-updated uniforms to the uniform registers.
[in] | type | GPU_SHADER_TYPE of the uniforms to be flushed. |