PS2SDK
PS2 Homebrew Libraries
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 
65 extern qword_t *draw_prim_start(qword_t *q, int context, prim_t *prim, color_t *color);
66 
68 extern qword_t *draw_prim_end(qword_t *q,int nreg, u64 reglist);
69 
71 extern int draw_convert_rgbq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours, unsigned char alpha);
72 
74 extern int draw_convert_rgbaq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours);
75 
77 extern int draw_convert_st(texel_t *output, int count, vertex_f_t *vertices, texel_f_t *coords);
78 
80 extern 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__ */
draw_convert_rgbq
int draw_convert_rgbq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours, unsigned char alpha)
Definition: draw3d.c:56
draw_primitives.h
count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:3
tamtypes.h
prim_t
Definition: draw_primitives.h:36
draw_prim_end
qword_t * draw_prim_end(qword_t *q, int nreg, u64 reglist)
Definition: draw3d.c:33
draw_convert_xyz
int draw_convert_xyz(xyz_t *output, float x, float y, int z, int count, vertex_f_t *vertices)
Definition: draw3d.c:147
gif_tags.h
draw_convert_st
int draw_convert_st(texel_t *output, int count, vertex_f_t *vertices, texel_f_t *coords)
Definition: draw3d.c:120
draw_types.h
draw_prim_start
qword_t * draw_prim_start(qword_t *q, int context, prim_t *prim, color_t *color)
Definition: draw3d.c:11
draw_convert_rgbaq
int draw_convert_rgbaq(color_t *output, int count, vertex_f_t *vertices, color_f_t *colours)
Definition: draw3d.c:88