ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
draw_tests.h
Go to the documentation of this file.
1 
6 #ifndef __DRAW_TESTS_H__
7 #define __DRAW_TESTS_H__
8 
9 #include <tamtypes.h>
10 #include <draw_buffers.h>
11 
12 /*& Alpha Testing */
13 #define ATEST_METHOD_ALLFAIL 0
14 #define ATEST_METHOD_ALLPASS 1
15 #define ATEST_METHOD_LESS 2
16 #define ATEST_METHOD_LESS_EQUAL 3
17 #define ATEST_METHOD_EQUAL 4
18 #define ATEST_METHOD_GREATER_EQUAL 5
19 #define ATEST_METHOD_GREATER 6
20 #define ATEST_METHOD_NOTEQUAL 7
21 
22 #define ATEST_KEEP_ALL 0
23 #define ATEST_KEEP_ZBUFFER 1
24 #define ATEST_KEEP_FRAMEBUFFER 2
25 #define ATEST_KEEP_ALPHA 3
26 
28 #define DTEST_METHOD_PASS_ZERO 0
29 #define DTEST_METHOD_PASS_ONE 1
30 
32 #define ZTEST_METHOD_ALLFAIL 0
33 #define ZTEST_METHOD_ALLPASS 1
34 #define ZTEST_METHOD_GREATER_EQUAL 2
35 #define ZTEST_METHOD_GREATER 3
36 
37 typedef struct {
38  unsigned char enable;
39  unsigned char method;
40  unsigned char compval;
41  unsigned char keep;
42 } atest_t;
43 
44 typedef struct {
45  unsigned char enable;
46  unsigned char pass;
47 } dtest_t;
48 
49 typedef struct {
50  unsigned char enable;
51  unsigned char method;
52 } ztest_t;
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
59 qword_t *draw_scissor_area(qword_t *q, int context, int x0, int x1, int y0, int y1);
60 
62 qword_t *draw_pixel_test(qword_t *q, int context, atest_t *atest, dtest_t *dtest, ztest_t *ztest);
63 
66 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* __DRAW_TESTS_H__ */
u8 context
Definition: main.c:71
qword_t * draw_disable_tests(qword_t *q, int context, zbuffer_t *z)
Definition: draw.c:120
qword_t * draw_enable_tests(qword_t *q, int context, zbuffer_t *z)
Definition: draw.c:134
qword_t * draw_scissor_area(qword_t *q, int context, int x0, int x1, int y0, int y1)
qword_t * draw_pixel_test(qword_t *q, int context, atest_t *atest, dtest_t *dtest, ztest_t *ztest)
unsigned char compval
Definition: draw_tests.h:40
unsigned char enable
Definition: draw_tests.h:38
unsigned char method
Definition: draw_tests.h:39
unsigned char keep
Definition: draw_tests.h:41
unsigned char pass
Definition: draw_tests.h:46
unsigned char enable
Definition: draw_tests.h:45
unsigned char method
Definition: draw_tests.h:51
unsigned char enable
Definition: draw_tests.h:50