PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
draw_sampling.h File Reference
#include <tamtypes.h>
+ Include dependency graph for draw_sampling.h:
+ This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Draw library sampling functions

Definition in file draw_sampling.h.


Data Structure Documentation

◆ lod_t

struct lod_t

Definition at line 39 of file draw_sampling.h.

Data Fields
unsigned char calculation
unsigned char max_level
unsigned char mag_filter
unsigned char min_filter
unsigned char mipmap_select
unsigned char l
float k

◆ mipmap_t

struct mipmap_t

Definition at line 49 of file draw_sampling.h.

Data Fields
int address1
int address2
int address3
char width1
char width2
char width3

◆ texwrap_t

struct texwrap_t

Definition at line 58 of file draw_sampling.h.

Data Fields
unsigned char horizontal
unsigned char vertical
int minu
int maxu
int minv
int maxv

Macro Definition Documentation

◆ LOD_FORMULAIC

#define LOD_FORMULAIC   0

Level of Detail

Definition at line 12 of file draw_sampling.h.

◆ LOD_USE_K

#define LOD_USE_K   1

Definition at line 13 of file draw_sampling.h.

◆ LOD_MAG_NEAREST

#define LOD_MAG_NEAREST   0

Texture Scaling

Definition at line 16 of file draw_sampling.h.

◆ LOD_MAG_LINEAR

#define LOD_MAG_LINEAR   1

Definition at line 17 of file draw_sampling.h.

◆ LOD_MIN_NEAREST

#define LOD_MIN_NEAREST   0

Definition at line 18 of file draw_sampling.h.

◆ LOD_MIN_LINEAR

#define LOD_MIN_LINEAR   1

Definition at line 19 of file draw_sampling.h.

◆ LOD_MIN_NEAR_MIPMAP_NEAR

#define LOD_MIN_NEAR_MIPMAP_NEAR   2

Definition at line 20 of file draw_sampling.h.

◆ LOD_MIN_NEAR_MIPMAP_LINE

#define LOD_MIN_NEAR_MIPMAP_LINE   3

Definition at line 21 of file draw_sampling.h.

◆ LOD_MIN_LINE_MIPMAP_NEAR

#define LOD_MIN_LINE_MIPMAP_NEAR   4

Definition at line 22 of file draw_sampling.h.

◆ LOD_MIN_LINE_MIPMAP_LINE

#define LOD_MIN_LINE_MIPMAP_LINE   5

Definition at line 23 of file draw_sampling.h.

◆ LOD_MIPMAP_REGISTER

#define LOD_MIPMAP_REGISTER   0

Mipmaps

Definition at line 26 of file draw_sampling.h.

◆ LOD_MIPMAP_CALCULATE

#define LOD_MIPMAP_CALCULATE   1

Definition at line 27 of file draw_sampling.h.

◆ WRAP_REPEAT

#define WRAP_REPEAT   0

Texture wrapping

Definition at line 30 of file draw_sampling.h.

◆ WRAP_CLAMP

#define WRAP_CLAMP   1

Definition at line 31 of file draw_sampling.h.

◆ WRAP_REGION_CLAMP

#define WRAP_REGION_CLAMP   2

Definition at line 32 of file draw_sampling.h.

◆ WRAP_REGION_REPEAT

#define WRAP_REGION_REPEAT   3

Definition at line 33 of file draw_sampling.h.

◆ ALPHA_EXPAND_NORMAL

#define ALPHA_EXPAND_NORMAL   0

Texture Alpha Expansion

Definition at line 36 of file draw_sampling.h.

◆ ALPHA_EXPAND_TRANSPARENT

#define ALPHA_EXPAND_TRANSPARENT   1

Definition at line 37 of file draw_sampling.h.

Function Documentation

◆ draw_texture_sampling()

qword_t * draw_texture_sampling ( qword_t *  q,
int  context,
lod_t lod 
)

Texture Sampling, Level-of-Detail, and Filtering

Definition at line 230 of file draw_environment.c.

References draw_texture_sampling(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_TEX1.

Referenced by draw_texture_sampling().

◆ draw_mipmap1()

qword_t * draw_mipmap1 ( qword_t *  q,
int  context,
mipmap_t mipmap 
)

Mipmap levels 1-3

Definition at line 243 of file draw_environment.c.

References draw_mipmap1(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_MIPTBP1.

Referenced by draw_mipmap1().

◆ draw_mipmap2()

qword_t * draw_mipmap2 ( qword_t *  q,
int  context,
mipmap_t mipmap 
)

Mipmap levels 4-6

Definition at line 258 of file draw_environment.c.

References draw_mipmap2(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_MIPTBP2.

Referenced by draw_mipmap2().

◆ draw_texture_wrapping()

qword_t * draw_texture_wrapping ( qword_t *  q,
int  context,
texwrap_t wrap 
)

Texture Clamping

Definition at line 301 of file draw_environment.c.

References draw_texture_wrapping(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_CLAMP.

Referenced by draw_texture_wrapping().

◆ draw_texture_expand_alpha()

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 draw_texture_expand_alpha(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_TEXA.

Referenced by draw_texture_expand_alpha().