ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
draw_sampling.h
Go to the documentation of this file.
1 
6 #ifndef __DRAW_SAMPLING_H__
7 #define __DRAW_SAMPLING_H__
8 
9 #include <tamtypes.h>
10 
12 #define LOD_FORMULAIC 0
13 #define LOD_USE_K 1
14 
16 #define LOD_MAG_NEAREST 0
17 #define LOD_MAG_LINEAR 1
18 #define LOD_MIN_NEAREST 0
19 #define LOD_MIN_LINEAR 1
20 #define LOD_MIN_NEAR_MIPMAP_NEAR 2
21 #define LOD_MIN_NEAR_MIPMAP_LINE 3
22 #define LOD_MIN_LINE_MIPMAP_NEAR 4
23 #define LOD_MIN_LINE_MIPMAP_LINE 5
24 
26 #define LOD_MIPMAP_REGISTER 0
27 #define LOD_MIPMAP_CALCULATE 1
28 
30 #define WRAP_REPEAT 0
31 #define WRAP_CLAMP 1
32 #define WRAP_REGION_CLAMP 2
33 #define WRAP_REGION_REPEAT 3
34 
36 #define ALPHA_EXPAND_NORMAL 0
37 #define ALPHA_EXPAND_TRANSPARENT 1
38 
39 typedef struct {
40  unsigned char calculation;
41  unsigned char max_level;
42  unsigned char mag_filter;
43  unsigned char min_filter;
44  unsigned char mipmap_select;
45  unsigned char l;
46  float k;
47 } lod_t;
48 
49 typedef struct {
50  int address1;
51  int address2;
52  int address3;
53  char width1;
54  char width2;
55  char width3;
56 } mipmap_t;
57 
58 typedef struct {
59  unsigned char horizontal;
60  unsigned char vertical;
61  int minu, maxu;
62  int minv, maxv;
63 } texwrap_t;
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
71 
73 qword_t *draw_mipmap1(qword_t *q, int context, mipmap_t *mipmap);
74 
76 qword_t *draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap);
77 
80 
82 qword_t *draw_texture_expand_alpha(qword_t *q, unsigned char zero_value, int expand, unsigned char one_value);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /* __DRAW_SAMPLING_H__ */
lod_t lod
Definition: main.c:86
u8 context
Definition: main.c:71
qword_t * draw_texture_sampling(qword_t *q, int context, lod_t *lod)
qword_t * draw_texture_expand_alpha(qword_t *q, unsigned char zero_value, int expand, unsigned char one_value)
qword_t * draw_mipmap1(qword_t *q, int context, mipmap_t *mipmap)
qword_t * draw_texture_wrapping(qword_t *q, int context, texwrap_t *wrap)
qword_t * draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap)
unsigned char mag_filter
Definition: draw_sampling.h:42
float k
Definition: draw_sampling.h:46
unsigned char l
Definition: draw_sampling.h:45
unsigned char calculation
Definition: draw_sampling.h:40
unsigned char mipmap_select
Definition: draw_sampling.h:44
unsigned char min_filter
Definition: draw_sampling.h:43
unsigned char max_level
Definition: draw_sampling.h:41
char width3
Definition: draw_sampling.h:55
int address1
Definition: draw_sampling.h:50
char width2
Definition: draw_sampling.h:54
char width1
Definition: draw_sampling.h:53
int address2
Definition: draw_sampling.h:51
int address3
Definition: draw_sampling.h:52
unsigned char vertical
Definition: draw_sampling.h:60
unsigned char horizontal
Definition: draw_sampling.h:59