ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include <tamtypes.h>
Go to the source code of this file.
Data Structures | |
struct | texinfo_t |
struct | framebuffer_t |
struct | zbuffer_t |
struct | texbuffer_t |
struct | clutbuffer_t |
Macros | |
#define | TEXTURE_COMPONENTS_RGB 0 |
#define | TEXTURE_COMPONENTS_RGBA 1 |
#define | TEXTURE_FUNCTION_MODULATE 0 |
#define | TEXTURE_FUNCTION_DECAL 1 |
#define | TEXTURE_FUNCTION_HIGHLIGHT 2 |
#define | TEXTURE_FUNCTION_HIGHLIGHT2 3 |
#define | CLUT_STORAGE_MODE1 0 |
#define | CLUT_STORAGE_MODE2 1 |
#define | CLUT_NO_LOAD 0 |
#define | CLUT_LOAD 1 |
#define | CLUT_LOAD_COPY_CBP0 2 |
#define | CLUT_LOAD_COPY_CBP1 3 |
#define | CLUT_COMPARE_CBP0 4 |
#define | CLUT_COMPARE_CBP1 5 |
Functions | |
unsigned char | draw_log2 (unsigned int x) |
qword_t * | draw_framebuffer (qword_t *q, int context, framebuffer_t *frame) |
qword_t * | draw_zbuffer (qword_t *q, int context, zbuffer_t *zbuffer) |
qword_t * | draw_texturebuffer (qword_t *q, int context, texbuffer_t *texbuffer, clutbuffer_t *clut) |
qword_t * | draw_clutbuffer (qword_t *q, int context, int psm, clutbuffer_t *clut) |
qword_t * | draw_clut_offset (qword_t *q, int cbw, int u, int v) |
Draw library buffer functions
Definition in file draw_buffers.h.
#define CLUT_COMPARE_CBP0 4 |
Definition at line 30 of file draw_buffers.h.
#define CLUT_COMPARE_CBP1 5 |
Definition at line 31 of file draw_buffers.h.
#define CLUT_LOAD 1 |
Definition at line 27 of file draw_buffers.h.
#define CLUT_LOAD_COPY_CBP0 2 |
Definition at line 28 of file draw_buffers.h.
#define CLUT_LOAD_COPY_CBP1 3 |
Definition at line 29 of file draw_buffers.h.
#define CLUT_NO_LOAD 0 |
CLUT Load Control
Definition at line 26 of file draw_buffers.h.
#define CLUT_STORAGE_MODE1 0 |
CLUT Storage Mode
Definition at line 22 of file draw_buffers.h.
#define CLUT_STORAGE_MODE2 1 |
Definition at line 23 of file draw_buffers.h.
#define TEXTURE_COMPONENTS_RGB 0 |
Texture Color Components
Definition at line 12 of file draw_buffers.h.
#define TEXTURE_COMPONENTS_RGBA 1 |
Definition at line 13 of file draw_buffers.h.
#define TEXTURE_FUNCTION_DECAL 1 |
Definition at line 17 of file draw_buffers.h.
#define TEXTURE_FUNCTION_HIGHLIGHT 2 |
Definition at line 18 of file draw_buffers.h.
#define TEXTURE_FUNCTION_HIGHLIGHT2 3 |
Definition at line 19 of file draw_buffers.h.
#define TEXTURE_FUNCTION_MODULATE 0 |
Texture Function
Definition at line 16 of file draw_buffers.h.
CLUT Storage Mode 2 Information
Definition at line 95 of file draw_environment.c.
References GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_TEXCLUT, GS_SET_TEXCLUT, and PACK_GIFTAG.
qword_t* draw_clutbuffer | ( | qword_t * | q, |
int | context, | ||
int | psm, | ||
clutbuffer_t * | clut | ||
) |
CLUT Storage Mode 1 Information
Definition at line 77 of file draw_environment.c.
References clutbuffer_t::address, clut, CLUT_STORAGE_MODE2, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_TEX2, GS_SET_TEX2, clutbuffer_t::load_method, PACK_GIFTAG, clutbuffer_t::psm, clutbuffer_t::start, and clutbuffer_t::storage_mode.
qword_t* draw_framebuffer | ( | qword_t * | q, |
int | context, | ||
framebuffer_t * | frame | ||
) |
Framebuffer Attributes
Definition at line 33 of file draw_environment.c.
References framebuffer_t::address, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_FRAME, GS_SET_FRAME, framebuffer_t::mask, PACK_GIFTAG, framebuffer_t::psm, and framebuffer_t::width.
Referenced by flip_buffers().
unsigned char draw_log2 | ( | unsigned int | x | ) |
Returns the power of 2 needed for texture width and height
Definition at line 348 of file draw.c.
References x.
Referenced by InitCB(), run_demo(), set_lod_clut_prim_tex_buff(), and setup_texture().
qword_t* draw_texturebuffer | ( | qword_t * | q, |
int | context, | ||
texbuffer_t * | texbuffer, | ||
clutbuffer_t * | clut | ||
) |
TextureBuffer Attributes
Definition at line 57 of file draw_environment.c.
References texbuffer_t::address, clutbuffer_t::address, clut, CLUT_STORAGE_MODE2, texinfo_t::components, context, texinfo_t::function, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_TEX0, GS_SET_TEX0, texinfo_t::height, texbuffer_t::info, clutbuffer_t::load_method, PACK_GIFTAG, texbuffer_t::psm, clutbuffer_t::psm, clutbuffer_t::start, clutbuffer_t::storage_mode, texinfo_t::width, and texbuffer_t::width.
Referenced by run_demo(), and setup_texture().
ZBuffer Attributes
Definition at line 45 of file draw_environment.c.
References zbuffer_t::address, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_ZBUF, GS_SET_ZBUF, zbuffer_t::mask, PACK_GIFTAG, and zbuffer_t::zsm.