summaryrefslogtreecommitdiff
path: root/include/rvl/GX/GXVert.h
blob: 02edfe0d26ab149229bdfae8e3c2866e549b1105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#ifndef RVL_SDK_GX_VERT_H
#define RVL_SDK_GX_VERT_H
#include "common.h"
#include "rvl/GX/GXHardware.h"

#ifdef __cplusplus
extern "C" {
#endif

static inline void GXCmd1u8(u8 uc) {
    WGPIPE.c = uc;
}

static inline void GXCmd1u16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXCmd1u32(u32 ul) {
    WGPIPE.i = ul;
}

static inline void GXPosition3f32(f32 x, f32 y, f32 z) {
    WGPIPE.f = x;
    WGPIPE.f = y;
    WGPIPE.f = z;
}

static inline void GXPosition3u8(u8 x, u8 y, u8 z) {
    WGPIPE.c = x;
    WGPIPE.c = y;
    WGPIPE.c = z;
}

static inline void GXPosition3s8(s8 x, s8 y, s8 z) {
    WGPIPE.c = x;
    WGPIPE.c = y;
    WGPIPE.c = z;
}

static inline void GXPosition3u16(u16 x, u16 y, u16 z) {
    WGPIPE.us = x;
    WGPIPE.us = y;
    WGPIPE.us = z;
}

static inline void GXPosition3s16(s16 x, s16 y, s16 z) {
    WGPIPE.s = x;
    WGPIPE.s = y;
    WGPIPE.s = z;
}

static inline void GXPosition2f32(f32 x, f32 y) {
    WGPIPE.f = x;
    WGPIPE.f = y;
}

static inline void GXPosition2u8(u8 x, u8 y) {
    WGPIPE.c = x;
    WGPIPE.c = y;
}

static inline void GXPosition2s8(s8 x, s8 y) {
    WGPIPE.c = x;
    WGPIPE.c = y;
}

static inline void GXPosition2u16(u16 x, u16 y) {
    WGPIPE.us = x;
    WGPIPE.us = y;
}

static inline void GXPosition2s16(s16 x, s16 y) {
    WGPIPE.s = x;
    WGPIPE.s = y;
}

static inline void GXPosition1x16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXPosition1x8(u8 uc) {
    WGPIPE.c = uc;
}

static inline void GXNormal3f32(f32 x, f32 y, f32 z) {
    WGPIPE.f = x;
    WGPIPE.f = y;
    WGPIPE.f = z;
}

static inline void GXNormal3s16(s16 x, s16 y, s16 z) {
    WGPIPE.s = x;
    WGPIPE.s = y;
    WGPIPE.s = z;
}

static inline void GXNormal3s8(s8 x, s8 y, s8 z) {
    WGPIPE.c = x;
    WGPIPE.c = y;
    WGPIPE.c = z;
}

static inline void GXNormal1x16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXNormal1x8(u8 uc) {
    WGPIPE.c = uc;
}

static inline void GXColor4u8(u8 r, u8 g, u8 b, u8 a) {
    WGPIPE.c = r;
    WGPIPE.c = g;
    WGPIPE.c = b;
    WGPIPE.c = a;
}

static inline void GXColor1u32(u32 color) {
    WGPIPE.i = color;
}

static inline void GXColor3u8(u8 r, u8 g, u8 b) {
    WGPIPE.c = r;
    WGPIPE.c = g;
    WGPIPE.c = b;
}

static inline void GXColor1u16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXColor1x16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXColor1x8(u8 uc) {
    WGPIPE.c = uc;
}

static inline void GXTexCoord2f32(f32 x, f32 y) {
    WGPIPE.f = x;
    WGPIPE.f = y;
}

static inline void GXTexCoord2s16(s16 x, s16 y) {
    WGPIPE.s = x;
    WGPIPE.s = y;
}

static inline void GXTexCoord2u16(u16 x, u16 y) {
    WGPIPE.us = x;
    WGPIPE.us = y;
}

static inline void GXTexCoord2s8(s8 x, s8 y) {
    WGPIPE.c = x;
    WGPIPE.c = y;
}

static inline void GXTexCoord2u8(u8 x, u8 y) {
    WGPIPE.c = x;
    WGPIPE.c = y;
}

static inline void GXTexCoord1f32(f32 f) {
    WGPIPE.f = f;
}

static inline void GXTexCoord1s16(s16 s) {
    WGPIPE.s = s;
}

static inline void GXTexCoord1u16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXTexCoord1s8(s8 c) {
    WGPIPE.c = c;
}

static inline void GXTexCoord1u8(u8 uc) {
    WGPIPE.c = uc;
}

static inline void GXTexCoord1x16(u16 us) {
    WGPIPE.us = us;
}

static inline void GXTexCoord1x8(u8 uc) {
    WGPIPE.c = uc;
}

#ifdef __cplusplus
}
#endif
#endif