PS2SDK
PS2 Homebrew Libraries
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 extern qword_t *draw_scissor_area(qword_t *q, int context, int x0, int x1, int y0, int y1);
60 
62 extern qword_t *draw_pixel_test(qword_t *q, int context, atest_t *atest, dtest_t *dtest, ztest_t *ztest);
63 
65 extern qword_t *draw_disable_tests(qword_t *q, int context, zbuffer_t *z);
66 
68 extern qword_t *draw_enable_tests(qword_t *q, int context, zbuffer_t *z);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* __DRAW_TESTS_H__ */
draw_enable_tests
qword_t * draw_enable_tests(qword_t *q, int context, zbuffer_t *z)
Definition: draw.c:135
draw_pixel_test
qword_t * draw_pixel_test(qword_t *q, int context, atest_t *atest, dtest_t *dtest, ztest_t *ztest)
Definition: draw_environment.c:286
dtest_t
Definition: draw_tests.h:44
atest_t
Definition: draw_tests.h:37
zbuffer_t
Definition: draw_buffers.h:48
tamtypes.h
ztest_t
Definition: draw_tests.h:49
draw_scissor_area
qword_t * draw_scissor_area(qword_t *q, int context, int x0, int x1, int y0, int y1)
Definition: draw_environment.c:273
draw_disable_tests
qword_t * draw_disable_tests(qword_t *q, int context, zbuffer_t *z)
Definition: draw.c:120
draw_buffers.h