ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
draw3d.h
Go to the documentation of this file.
1 
6 #ifndef __DRAW3D_H__
7 #define __DRAW3D_H__
8 
9 #include <tamtypes.h>
10 
11 #include <draw_primitives.h>
12 #include <draw_types.h>
13 #include <gif_tags.h>
14 
16 #define DRAW_XYZ_REGLIST \
17  ((u64)GIF_REG_XYZ2) << 0 | \
18  ((u64)GIF_REG_XYZ2) << 4
19 
20 #define DRAW_RGBAQ_REGLIST \
21  ((u64)GIF_REG_RGBAQ) << 0 | \
22  ((u64)GIF_REG_XYZ2) << 4
23 
24 #define DRAW_UV_REGLIST \
25  ((u64)GIF_REG_UV) << 0 | \
26  ((u64)GIF_REG_XYZ2) << 4
27 
28 #define DRAW_RGBAQ_UV_REGLIST \
29  ((u64)GIF_REG_RGBAQ) << 0 | \
30  ((u64)GIF_REG_UV) << 4 | \
31  ((u64)GIF_REG_XYZ2) << 8
32 
33 #define DRAW_STQ_REGLIST \
34  ((u64)GIF_REG_RGBAQ) << 0 | \
35  ((u64)GIF_REG_ST) << 4 | \
36  ((u64)GIF_REG_XYZ2) << 8
37 
55 #define DRAW_STQ2_REGLIST \
56  ((u64)GIF_REG_ST) << 0 | \
57  ((u64)GIF_REG_RGBAQ) << 4 | \
58  ((u64)GIF_REG_XYZ2) << 8
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
66 
68 qword_t *draw_prim_end(qword_t *q,int nreg, u64 reglist);
69 
71 int draw_convert_rgbq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours, unsigned char alpha);
72 
75 
77 int draw_convert_st(texel_t *output, int count, vertex_f_t *vertices, texel_f_t *coords);
78 
80 int draw_convert_xyz(xyz_t *output, float x, float y, int z, int count, vertex_f_t *vertices);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* __DRAW3D_H__ */
VECTOR vertices[24]
Definition: mesh_data.c:31
VECTOR colours[24]
Definition: mesh_data.c:58
int draw_convert_st(texel_t *output, int count, vertex_f_t *vertices, texel_f_t *coords)
Definition: draw3d.c:120
qword_t * draw_prim_start(qword_t *q, int context, prim_t *prim, color_t *color)
Definition: draw3d.c:11
int draw_convert_rgbq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours, unsigned char alpha)
Definition: draw3d.c:56
int draw_convert_xyz(xyz_t *output, float x, float y, int z, int count, vertex_f_t *vertices)
Definition: draw3d.c:147
qword_t * draw_prim_end(qword_t *q, int nreg, u64 reglist)
Definition: draw3d.c:33
int draw_convert_rgbaq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours)
Definition: draw3d.c:88
prim_t prim
Definition: main.c:74
u8 context
Definition: main.c:71
s32 x
Definition: libmouse.c:34
s32 y
Definition: libmouse.c:34
unsigned long u64
Definition: tamtypes.h:34