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 | lod_t |
struct | mipmap_t |
struct | texwrap_t |
Macros | |
#define | LOD_FORMULAIC 0 |
#define | LOD_USE_K 1 |
#define | LOD_MAG_NEAREST 0 |
#define | LOD_MAG_LINEAR 1 |
#define | LOD_MIN_NEAREST 0 |
#define | LOD_MIN_LINEAR 1 |
#define | LOD_MIN_NEAR_MIPMAP_NEAR 2 |
#define | LOD_MIN_NEAR_MIPMAP_LINE 3 |
#define | LOD_MIN_LINE_MIPMAP_NEAR 4 |
#define | LOD_MIN_LINE_MIPMAP_LINE 5 |
#define | LOD_MIPMAP_REGISTER 0 |
#define | LOD_MIPMAP_CALCULATE 1 |
#define | WRAP_REPEAT 0 |
#define | WRAP_CLAMP 1 |
#define | WRAP_REGION_CLAMP 2 |
#define | WRAP_REGION_REPEAT 3 |
#define | ALPHA_EXPAND_NORMAL 0 |
#define | ALPHA_EXPAND_TRANSPARENT 1 |
Functions | |
qword_t * | draw_texture_sampling (qword_t *q, int context, lod_t *lod) |
qword_t * | draw_mipmap1 (qword_t *q, int context, mipmap_t *mipmap) |
qword_t * | draw_mipmap2 (qword_t *q, int context, mipmap_t *mipmap) |
qword_t * | draw_texture_wrapping (qword_t *q, int context, texwrap_t *wrap) |
qword_t * | draw_texture_expand_alpha (qword_t *q, unsigned char zero_value, int expand, unsigned char one_value) |
Draw library sampling functions
Definition in file draw_sampling.h.
#define ALPHA_EXPAND_NORMAL 0 |
Texture Alpha Expansion
Definition at line 36 of file draw_sampling.h.
#define ALPHA_EXPAND_TRANSPARENT 1 |
Definition at line 37 of file draw_sampling.h.
#define LOD_FORMULAIC 0 |
Level of Detail
Definition at line 12 of file draw_sampling.h.
#define LOD_MAG_LINEAR 1 |
Definition at line 17 of file draw_sampling.h.
#define LOD_MAG_NEAREST 0 |
Texture Scaling
Definition at line 16 of file draw_sampling.h.
#define LOD_MIN_LINE_MIPMAP_LINE 5 |
Definition at line 23 of file draw_sampling.h.
#define LOD_MIN_LINE_MIPMAP_NEAR 4 |
Definition at line 22 of file draw_sampling.h.
#define LOD_MIN_LINEAR 1 |
Definition at line 19 of file draw_sampling.h.
#define LOD_MIN_NEAR_MIPMAP_LINE 3 |
Definition at line 21 of file draw_sampling.h.
#define LOD_MIN_NEAR_MIPMAP_NEAR 2 |
Definition at line 20 of file draw_sampling.h.
#define LOD_MIN_NEAREST 0 |
Definition at line 18 of file draw_sampling.h.
#define LOD_MIPMAP_CALCULATE 1 |
Definition at line 27 of file draw_sampling.h.
#define LOD_MIPMAP_REGISTER 0 |
Mipmaps
Definition at line 26 of file draw_sampling.h.
#define LOD_USE_K 1 |
Definition at line 13 of file draw_sampling.h.
#define WRAP_CLAMP 1 |
Definition at line 31 of file draw_sampling.h.
#define WRAP_REGION_CLAMP 2 |
Definition at line 32 of file draw_sampling.h.
#define WRAP_REGION_REPEAT 3 |
Definition at line 33 of file draw_sampling.h.
#define WRAP_REPEAT 0 |
Texture wrapping
Definition at line 30 of file draw_sampling.h.
Mipmap levels 1-3
Definition at line 243 of file draw_environment.c.
References mipmap_t::address1, mipmap_t::address2, mipmap_t::address3, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_MIPTBP1, GS_SET_MIPTBP1, PACK_GIFTAG, mipmap_t::width1, mipmap_t::width2, and mipmap_t::width3.
Mipmap levels 4-6
Definition at line 258 of file draw_environment.c.
References mipmap_t::address1, mipmap_t::address2, mipmap_t::address3, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_MIPTBP2, GS_SET_MIPTBP2, PACK_GIFTAG, mipmap_t::width1, mipmap_t::width2, and mipmap_t::width3.
qword_t* draw_texture_expand_alpha | ( | qword_t * | q, |
unsigned char | zero_value, | ||
int | expand, | ||
unsigned char | one_value | ||
) |
Alpha Expansion Values
Definition at line 315 of file draw_environment.c.
References GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_TEXA, GS_SET_TEXA, and PACK_GIFTAG.
Texture Sampling, Level-of-Detail, and Filtering
Definition at line 230 of file draw_environment.c.
References lod_t::calculation, context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_TEX1, GS_SET_TEX1, lod_t::k, lod_t::l, lod, lod_t::mag_filter, lod_t::max_level, lod_t::min_filter, lod_t::mipmap_select, and PACK_GIFTAG.
Referenced by run_demo(), and setup_texture().
Texture Clamping
Definition at line 301 of file draw_environment.c.
References context, GIF_FLG_PACKED, GIF_REG_AD, GIF_SET_TAG, GS_REG_CLAMP, GS_SET_CLAMP, texwrap_t::horizontal, texwrap_t::maxu, texwrap_t::maxv, texwrap_t::minu, texwrap_t::minv, PACK_GIFTAG, and texwrap_t::vertical.