libdragon
rdpq_tri.h
1
8#ifndef LIBDRAGON_RDPQ_TRI_H
9#define LIBDRAGON_RDPQ_TRI_H
10
11#include "rdpq.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
34typedef struct rdpq_trifmt_s {
42
51
61
70
79
90
100
113extern const rdpq_trifmt_t TRIFMT_FILL;
114
120extern const rdpq_trifmt_t TRIFMT_SHADE;
121
127extern const rdpq_trifmt_t TRIFMT_TEX;
128
135
141extern const rdpq_trifmt_t TRIFMT_ZBUF;
142
149
155extern const rdpq_trifmt_t TRIFMT_ZBUF_TEX;
156
163
241void rdpq_triangle(const rdpq_trifmt_t *fmt, const float *v1, const float *v2, const float *v3);
242
243#ifdef __cplusplus
244}
245#endif
246
247#endif
RDP Command queue.
rdpq_tile_t
Tile descriptors.
Definition: rdpq.h:249
const rdpq_trifmt_t TRIFMT_ZBUF_TEX
Format descriptor for a z-buffered, textured triangle.
Definition: rdpq_tri.c:63
const rdpq_trifmt_t TRIFMT_ZBUF_SHADE_TEX
Format descriptor for a z-buffered, shaded, textured triangle.
Definition: rdpq_tri.c:67
const rdpq_trifmt_t TRIFMT_FILL
Format descriptor for a solid-filled triangle.
Definition: rdpq_tri.c:39
const rdpq_trifmt_t TRIFMT_TEX
Format descriptor for a textured triangle.
Definition: rdpq_tri.c:47
const rdpq_trifmt_t TRIFMT_SHADE_TEX
Format descriptor for a shaded, textured triangle.
Definition: rdpq_tri.c:51
const rdpq_trifmt_t TRIFMT_SHADE
Format descriptor for a shaded triangle.
Definition: rdpq_tri.c:43
const rdpq_trifmt_t TRIFMT_ZBUF_SHADE
Format descriptor for a z-buffered, shaded triangle.
Definition: rdpq_tri.c:59
const rdpq_trifmt_t TRIFMT_ZBUF
Format descriptor for a solid-filled, z-buffered triangle.
Definition: rdpq_tri.c:55
void rdpq_triangle(const rdpq_trifmt_t *fmt, const float *v1, const float *v2, const float *v3)
Draw a triangle (RDP command: TRI_*)
Definition: rdpq_tri.c:533
Format descriptor of a triangle.
Definition: rdpq_tri.h:34
int tex_offset
Index of the texture component within the vertex arrays.
Definition: rdpq_tri.h:69
rdpq_tile_t tex_tile
RDP tile descriptor that describes the texture (0-7).
Definition: rdpq_tri.h:78
int pos_offset
Index of the position component within the vertex arrays.
Definition: rdpq_tri.h:41
bool shade_flat
If true, draw the triangle with flat shading (instead of gouraud shading).
Definition: rdpq_tri.h:60
int shade_offset
Index of the shade component within the vertex arrays.
Definition: rdpq_tri.h:50
int z_offset
Index of the depth component within the vertex array.
Definition: rdpq_tri.h:98
int tex_mipmaps
Number of mipmaps to use for the texture.
Definition: rdpq_tri.h:89