19#include "powerblocks/core/utils/math/matrix34.h"
51 GX_MTX_ID_10 = (10*3),
52 GX_MTX_ID_11 = (11*3),
53 GX_MTX_ID_12 = (12*3),
54 GX_MTX_ID_13 = (13*3),
55 GX_MTX_ID_14 = (14*3),
56 GX_MTX_ID_15 = (15*3),
57 GX_MTX_ID_16 = (16*3),
58 GX_MTX_ID_17 = (17*3),
59 GX_MTX_ID_18 = (18*3),
60 GX_MTX_ID_19 = (19*3),
61 GX_MTX_ID_20 = (20*3),
63 GX_MTX_ID_IDENTITY = GX_MTX_ID_20
81extern void gx_flash_viewport(
float x,
float y,
float width,
float height,
float near,
float far,
bool jitter);
145 GX_COLOR_CHANNEL_COLOR0 = 0,
146 GX_COLOR_CHANNEL_COLOR1 = 1,
147 GX_COLOR_CHANNEL_ALPHA0 = 2,
148 GX_COLOR_CHANNEL_ALPHA1 = 3
153 GX_LIGHT_BIT_0 = (1<<2),
154 GX_LIGHT_BIT_1 = (1<<3),
155 GX_LIGHT_BIT_2 = (1<<4),
156 GX_LIGHT_BIT_3 = (1<<5),
157 GX_LIGHT_BIT_4 = (1<<11),
158 GX_LIGHT_BIT_5 = (1<<12),
159 GX_LIGHT_BIT_6 = (1<<13),
160 GX_LIGHT_BIT_7 = (1<<14)
166 GX_ATTENUATION_MODE_NONE,
167 GX_ATTENUATION_MODE_SPECULAR = 1,
168 GX_ATTENUATION_MODE_SPOTLIGHT = 3
169} gx_attenuation_mode_t;
172 GX_DIFFUSE_MODE_NONE,
178 GX_XF_COLOR_AMBIENT_0 = 0x100A,
179 GX_XF_COLOR_AMBIENT_1 = 0x100B,
180 GX_XF_COLOR_MATERIAL_0 = 0x100C,
181 GX_XF_COLOR_MATERIAL_1 = 0x100D
202 vec3 cos_attenuation;
205 vec3 distance_attenuation;
248 bool lighting,
bool ambient_source,
bool material_source,
249 gx_diffuse_mode_t diffuse, gx_attenuation_mode_t attenuation);
254extern void gx_flash_xf_color(gx_xf_color_t
id, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
269 GX_TEXGEN_TYPE_REGULAR,
270 GX_TEXGEN_TYPE_EMBOSS,
271 GX_TEXGEN_TYPE_COLOR_0,
272 GX_TEXGEN_TYPE_COLOR_1
276 GX_TEXGEN_SOURCE_POSITION,
277 GX_TEXGEN_SOURCE_NORMAL,
278 GX_TEXGEN_SOURCE_COLORS,
279 GX_TEXGEN_SOURCE_BINORMAL_T,
280 GX_TEXGEN_SOURCE_BINORMAL_B,
281 GX_TEXGEN_SOURCE_TEX0,
282 GX_TEXGEN_SOURCE_TEX1,
283 GX_TEXGEN_SOURCE_TEX2,
284 GX_TEXGEN_SOURCE_TEX3,
285 GX_TEXGEN_SOURCE_TEX4,
286 GX_TEXGEN_SOURCE_TEX5,
287 GX_TEXGEN_SOURCE_TEX6,
288 GX_TEXGEN_SOURCE_TEX7
329extern void gx_configure_texcoord_channel(gx_texture_map_t map, gx_texgen_source_t source, gx_texgen_type_t type,
bool projection,
bool three_component, gx_light_id_t embossing_light);
void gx_configure_dual_texcoord(gx_texture_map_t map, gx_mtx_id_t index, bool normalize)
Configure dual texcoords.
Definition gx.c:1346
void gx_configure_color_channel(gx_color_channel_t channel, gx_light_bit_t lights, bool lighting, bool ambient_source, bool material_source, gx_diffuse_mode_t diffuse, gx_attenuation_mode_t attenuation)
Configures 1 of the 2/4 color channels.
Definition gx.c:1284
void gx_flash_dual_texcoord_matrix(matrix34 mtx, gx_mtx_id_t index, bool type)
Fashes a dual texcoord matrix in the XF matrix stack.
Definition gx.c:1351
void gx_flash_projection(const matrix4 mtx, bool is_perspective)
Flashes the projection matrix onto the XF settings.
Definition gx.c:1228
void gx_set_current_psn_matrix(gx_mtx_id_t index)
Sets the current pair of position and normal matrices.
Definition gx.c:1270
void gx_set_texcoord_channels(uint32_t count)
Set a texture coord count.
Definition gx.c:1332
void gx_flash_matrix(const matrix34 mtx, gx_mtx_id_t index, bool type)
Fashes a matrix to the XF Stack.
Definition gx.c:1239
void gx_flash_enable_dual_texcoord(bool enable)
Sets the Dual Texture Coord Enable/Disable Register.
Definition gx.c:1407
void gx_flash_xf_color(gx_xf_color_t id, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Sets a XF Color Value.
Definition gx.c:1305
void gx_configure_texcoord_channel(gx_texture_map_t map, gx_texgen_source_t source, gx_texgen_type_t type, bool projection, bool three_component, gx_light_id_t embossing_light)
Configures 1 of the 8 texcoord channels.
Definition gx.c:1337
void gx_set_color_channels(uint32_t count)
Sets a color channel count.
Definition gx.c:1279
void gx_flash_nrm_matrix(const matrix3 mtx, gx_mtx_id_t index)
Fashes a normal matrix into the XF matrix stack.
Definition gx.c:1257
void gx_flash_light(gx_light_id_t id, const gx_light_t *light)
Flash one of the lights.
Definition gx.c:1310
void gx_flash_viewport(float x, float y, float width, float height, float near, float far, bool jitter)
Flashes the viewport onto the XF settings.
Definition gx.c:1201
gx_mtx_id_t
Universal matrix ids.
Definition gx_xf.h:40
void gx_set_current_texcoord_matrix(gx_texture_map_t map, gx_mtx_id_t index)
Sets the current texcoord matrix.
Definition gx.c:1369