sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
draw_sampling.h
Go to the documentation of this file.
1
6
7#ifndef __DRAW_SAMPLING_H__
8#define __DRAW_SAMPLING_H__
9
10#include <tamtypes.h>
11
13#define LOD_FORMULAIC 0
14#define LOD_USE_K 1
15
17#define LOD_MAG_NEAREST 0
18#define LOD_MAG_LINEAR 1
19#define LOD_MIN_NEAREST 0
20#define LOD_MIN_LINEAR 1
21#define LOD_MIN_NEAR_MIPMAP_NEAR 2
22#define LOD_MIN_NEAR_MIPMAP_LINE 3
23#define LOD_MIN_LINE_MIPMAP_NEAR 4
24#define LOD_MIN_LINE_MIPMAP_LINE 5
25
27#define LOD_MIPMAP_REGISTER 0
28#define LOD_MIPMAP_CALCULATE 1
29
31#define WRAP_REPEAT 0
32#define WRAP_CLAMP 1
33#define WRAP_REGION_CLAMP 2
34#define WRAP_REGION_REPEAT 3
35
37#define ALPHA_EXPAND_NORMAL 0
38#define ALPHA_EXPAND_TRANSPARENT 1
39
40typedef struct {
41 unsigned char calculation;
42 unsigned char max_level;
43 unsigned char mag_filter;
44 unsigned char min_filter;
45 unsigned char mipmap_select;
46 unsigned char l;
47 float k;
48} lod_t;
49
50typedef struct {
51 int address1;
52 int address2;
53 int address3;
54 char width1;
55 char width2;
56 char width3;
57} mipmap_t;
58
59typedef struct {
60 unsigned char horizontal;
61 unsigned char vertical;
62 int minu, maxu;
63 int minv, maxv;
64} texwrap_t;
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
71extern qword_t *draw_texture_sampling(qword_t *q, int context, lod_t *lod);
72
74extern qword_t *draw_mipmap1(qword_t *q, int context, mipmap_t *mipmap);
75
77extern qword_t *draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap);
78
80extern qword_t *draw_texture_wrapping(qword_t *q, int context, texwrap_t *wrap);
81
83extern qword_t *draw_texture_expand_alpha(qword_t *q, unsigned char zero_value, int expand, unsigned char one_value);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* __DRAW_SAMPLING_H__ */
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_texture_sampling(qword_t *q, int context, lod_t *lod)
qword_t * draw_mipmap2(qword_t *q, int context, mipmap_t *mipmap)