sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
draw_buffers.h
Go to the documentation of this file.
1
6
7#ifndef __DRAW_BUFFERS_H__
8#define __DRAW_BUFFERS_H__
9
10#include <tamtypes.h>
11
13#define TEXTURE_COMPONENTS_RGB 0
14#define TEXTURE_COMPONENTS_RGBA 1
15
17#define TEXTURE_FUNCTION_MODULATE 0
18#define TEXTURE_FUNCTION_DECAL 1
19#define TEXTURE_FUNCTION_HIGHLIGHT 2
20#define TEXTURE_FUNCTION_HIGHLIGHT2 3
21
23#define CLUT_STORAGE_MODE1 0
24#define CLUT_STORAGE_MODE2 1
25
27#define CLUT_NO_LOAD 0
28#define CLUT_LOAD 1
29#define CLUT_LOAD_COPY_CBP0 2
30#define CLUT_LOAD_COPY_CBP1 3
31#define CLUT_COMPARE_CBP0 4
32#define CLUT_COMPARE_CBP1 5
33
34typedef struct {
35 unsigned char width;
36 unsigned char height;
37 unsigned char components;
38 unsigned char function;
39} texinfo_t;
40
41typedef struct {
42 unsigned int address;
43 unsigned int width;
44 unsigned int height;
45 unsigned int psm;
46 unsigned int mask;
48
49typedef struct {
50 unsigned int enable;
51 unsigned int method;
52 unsigned int address;
53 unsigned int zsm;
54 unsigned int mask;
55} zbuffer_t;
56
57typedef struct {
58 unsigned int address;
59 unsigned int width;
60 unsigned int psm;
61 texinfo_t info;
63
64typedef struct {
65 unsigned int address;
66 unsigned int psm;
67 unsigned int storage_mode;
68 unsigned int start;
69 unsigned int load_method;
71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
77extern unsigned char draw_log2(unsigned int x);
78
80extern qword_t *draw_framebuffer(qword_t *q, int context, framebuffer_t *frame);
81
83extern qword_t *draw_zbuffer(qword_t *q, int context, zbuffer_t *zbuffer);
84
86extern qword_t *draw_texturebuffer(qword_t *q, int context, texbuffer_t *texbuffer, clutbuffer_t *clut);
87
89extern qword_t *draw_clutbuffer(qword_t *q, int context, int psm, clutbuffer_t *clut);
90
92extern qword_t *draw_clut_offset(qword_t *q, int cbw, int u, int v);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* __DRAW_BUFFERS_H__ */
unsigned char draw_log2(unsigned int x)
Definition draw.c:349
qword_t * draw_framebuffer(qword_t *q, int context, framebuffer_t *frame)
qword_t * draw_clut_offset(qword_t *q, int cbw, int u, int v)
qword_t * draw_zbuffer(qword_t *q, int context, zbuffer_t *zbuffer)
qword_t * draw_texturebuffer(qword_t *q, int context, texbuffer_t *texbuffer, clutbuffer_t *clut)
qword_t * draw_clutbuffer(qword_t *q, int context, int psm, clutbuffer_t *clut)