libdragon
Loading...
Searching...
No Matches
rdpq_tri.h
Go to the documentation of this file.
1
9#ifndef LIBDRAGON_RDPQ_TRI_H
10#define LIBDRAGON_RDPQ_TRI_H
11
12#include "rdpq.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
35typedef struct rdpq_trifmt_s {
43
52
62
71
80
91
101
114extern const rdpq_trifmt_t TRIFMT_FILL;
115
123extern const rdpq_trifmt_t TRIFMT_SHADE;
124
132extern const rdpq_trifmt_t TRIFMT_TEX;
133
142
148extern const rdpq_trifmt_t TRIFMT_ZBUF;
149
156
162extern const rdpq_trifmt_t TRIFMT_ZBUF_TEX;
163
170
248void rdpq_triangle(const rdpq_trifmt_t *fmt, const float *v1, const float *v2, const float *v3);
249
250#ifdef __cplusplus
251}
252#endif
253
254#endif
RDP Command queue.
rdpq_tile_t
Tile descriptors.
Definition rdpq.h:250
int tex_offset
Index of the texture component within the vertex arrays.
Definition rdpq_tri.h:70
rdpq_tile_t tex_tile
RDP tile descriptor that describes the texture (0-7).
Definition rdpq_tri.h:79
const rdpq_trifmt_t TRIFMT_ZBUF_TEX
Format descriptor for a z-buffered, textured triangle.
Definition rdpq_tri.c:64
int pos_offset
Index of the position component within the vertex arrays.
Definition rdpq_tri.h:42
bool shade_flat
If true, draw the triangle with flat shading (instead of gouraud shading).
Definition rdpq_tri.h:61
const rdpq_trifmt_t TRIFMT_ZBUF_SHADE_TEX
Format descriptor for a z-buffered, shaded, textured triangle.
Definition rdpq_tri.c:68
const rdpq_trifmt_t TRIFMT_FILL
Format descriptor for a solid-filled triangle.
Definition rdpq_tri.c:40
const rdpq_trifmt_t TRIFMT_TEX
Format descriptor for a textured triangle.
Definition rdpq_tri.c:48
int shade_offset
Index of the shade component within the vertex arrays.
Definition rdpq_tri.h:51
const rdpq_trifmt_t TRIFMT_SHADE_TEX
Format descriptor for a shaded, textured triangle.
Definition rdpq_tri.c:52
const rdpq_trifmt_t TRIFMT_SHADE
Format descriptor for a shaded triangle.
Definition rdpq_tri.c:44
const rdpq_trifmt_t TRIFMT_ZBUF_SHADE
Format descriptor for a z-buffered, shaded triangle.
Definition rdpq_tri.c:60
int z_offset
Index of the depth component within the vertex array.
Definition rdpq_tri.h:99
const rdpq_trifmt_t TRIFMT_ZBUF
Format descriptor for a solid-filled, z-buffered triangle.
Definition rdpq_tri.c:56
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:534
int tex_mipmaps
Number of mipmaps to use for the texture.
Definition rdpq_tri.h:90
Format descriptor of a triangle.
Definition rdpq_tri.h:35