ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Functions | |
qword_t * | draw_prim_start (qword_t *q, int context, prim_t *prim, color_t *color) |
qword_t * | draw_prim_end (qword_t *q, int nreg, u64 reglist) |
int | draw_convert_rgbq (color_t *output, int count, vertex_f_t *vertices, color_f_t *colours, unsigned char alpha) |
int | draw_convert_rgbaq (color_t *output, int count, vertex_f_t *vertices, color_f_t *colours) |
int | draw_convert_st (texel_t *output, int count, vertex_f_t *vertices, texel_f_t *coords) |
int | draw_convert_xyz (xyz_t *output, float x, float y, int z, int count, vertex_f_t *vertices) |
Variables | |
static qword_t * | __prim_start = NULL |
int draw_convert_rgbaq | ( | color_t * | output, |
int | count, | ||
vertex_f_t * | vertices, | ||
color_f_t * | colours | ||
) |
Converts floating point color and calculates q value
Definition at line 88 of file draw3d.c.
References color_t::a, color_t::b, colours, color_t::g, color_t::q, color_t::r, and vertices.
int draw_convert_rgbq | ( | color_t * | output, |
int | count, | ||
vertex_f_t * | vertices, | ||
color_f_t * | colours, | ||
unsigned char | alpha | ||
) |
Converts floating point color, replacing alpha with constant value, and calculates q
Definition at line 56 of file draw3d.c.
References color_t::a, color_t::b, colours, color_t::g, color_t::q, color_t::r, and vertices.
Referenced by render(), and render_teapot().
int draw_convert_st | ( | texel_t * | output, |
int | count, | ||
vertex_f_t * | vertices, | ||
texel_f_t * | coords | ||
) |
Calculates the st coordinates from the perspective coordinate q = 1/w
Definition at line 120 of file draw3d.c.
References texel_t::s, texel_f_t::s, texel_t::t, texel_f_t::t, and vertices.
Referenced by render().
int draw_convert_xyz | ( | xyz_t * | output, |
float | x, | ||
float | y, | ||
int | z, | ||
int | count, | ||
vertex_f_t * | vertices | ||
) |
Ends a primitive by calculating the number of qwords used, the number of registers, the register list
Definition at line 33 of file draw3d.c.
References __prim_start, qword_t::dw, GIF_FLG_REGLIST, and GIF_SET_TAG.
Referenced by fontstudio_print_string(), fontx_print_ascii(), fontx_print_sjis(), render(), and render_teapot().
Begins a primitive, allowing for vertex data to be filled in the packet directly
Definition at line 11 of file draw3d.c.
References __prim_start, prim_t::antialiasing, prim_t::blending, prim_t::colorfix, context, prim_t::fogging, GIF_FLG_PACKED, GIF_REG_AD, GIF_REG_RGBAQ, GIF_SET_TAG, GS_REG_PRIM, GS_SET_PRIM, prim_t::mapping, prim_t::mapping_type, PACK_GIFTAG, prim, color_t::rgbaq, prim_t::shading, and prim_t::type.
Referenced by fontstudio_print_string(), fontx_print_ascii(), fontx_print_sjis(), render(), and render_teapot().
Definition at line 9 of file draw3d.c.
Referenced by draw_prim_end(), and draw_prim_start().