PS2SDK
PS2 Homebrew Libraries
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 
70 extern qword_t *draw_texture_sampling(qword_t *q, int context, lod_t *lod);
71 
73 extern qword_t *draw_mipmap1(qword_t *q, int context, mipmap_t *mipmap);
74 
76 extern qword_t *draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap);
77 
79 extern qword_t *draw_texture_wrapping(qword_t *q, int context, texwrap_t *wrap);
80 
82 extern 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__ */
draw_texture_expand_alpha
qword_t * draw_texture_expand_alpha(qword_t *q, unsigned char zero_value, int expand, unsigned char one_value)
Definition: draw_environment.c:315
draw_mipmap1
qword_t * draw_mipmap1(qword_t *q, int context, mipmap_t *mipmap)
Definition: draw_environment.c:243
lod_t
Definition: draw_sampling.h:39
tamtypes.h
mipmap_t
Definition: draw_sampling.h:49
draw_texture_wrapping
qword_t * draw_texture_wrapping(qword_t *q, int context, texwrap_t *wrap)
Definition: draw_environment.c:301
draw_mipmap2
qword_t * draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap)
Definition: draw_environment.c:258
draw_texture_sampling
qword_t * draw_texture_sampling(qword_t *q, int context, lod_t *lod)
Definition: draw_environment.c:230
texwrap_t
Definition: draw_sampling.h:58