citro3d
Loading...
Searching...
No Matches
include
c3d
mtxstack.h
1
#pragma once
2
#include "
maths.h
"
3
4
#define C3D_MTXSTACK_SIZE 8
5
6
typedef
struct
7
{
8
C3D_Mtx
m[C3D_MTXSTACK_SIZE];
9
int
pos;
10
u8
unifType, unifPos, unifLen;
11
bool
isDirty;
12
}
C3D_MtxStack
;
13
14
static
inline
C3D_Mtx
* MtxStack_Cur(
C3D_MtxStack
* stk)
15
{
16
stk->isDirty =
true
;
17
return
&stk->m[stk->pos];
18
}
19
20
void
MtxStack_Init(
C3D_MtxStack
* stk);
21
void
MtxStack_Bind(
C3D_MtxStack
* stk,
GPU_SHADER_TYPE
unifType,
int
unifPos,
int
unifLen);
22
C3D_Mtx
* MtxStack_Push(
C3D_MtxStack
* stk);
23
C3D_Mtx
* MtxStack_Pop(
C3D_MtxStack
* stk);
24
void
MtxStack_Update(
C3D_MtxStack
* stk);
GPU_SHADER_TYPE
GPU_SHADER_TYPE
maths.h
Basic math library for matrix, vector, and quaternion operations.
C3D_MtxStack
Definition
mtxstack.h:7
u8
uint8_t u8
C3D_Mtx
Row-major 4x4 matrix.
Definition
types.h:91
Generated by
1.9.8