PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
draw_tests.h File Reference
#include <tamtypes.h>
#include <draw_buffers.h>
+ Include dependency graph for draw_tests.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  atest_t
 
struct  dtest_t
 
struct  ztest_t
 

Macros

#define ATEST_METHOD_ALLFAIL   0
 
#define ATEST_METHOD_ALLPASS   1
 
#define ATEST_METHOD_LESS   2
 
#define ATEST_METHOD_LESS_EQUAL   3
 
#define ATEST_METHOD_EQUAL   4
 
#define ATEST_METHOD_GREATER_EQUAL   5
 
#define ATEST_METHOD_GREATER   6
 
#define ATEST_METHOD_NOTEQUAL   7
 
#define ATEST_KEEP_ALL   0
 
#define ATEST_KEEP_ZBUFFER   1
 
#define ATEST_KEEP_FRAMEBUFFER   2
 
#define ATEST_KEEP_ALPHA   3
 
#define DTEST_METHOD_PASS_ZERO   0
 
#define DTEST_METHOD_PASS_ONE   1
 
#define ZTEST_METHOD_ALLFAIL   0
 
#define ZTEST_METHOD_ALLPASS   1
 
#define ZTEST_METHOD_GREATER_EQUAL   2
 
#define ZTEST_METHOD_GREATER   3
 

Functions

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)
 
qword_t * draw_disable_tests (qword_t *q, int context, zbuffer_t *z)
 
qword_t * draw_enable_tests (qword_t *q, int context, zbuffer_t *z)
 

Detailed Description

Draw library testing functions

Definition in file draw_tests.h.


Data Structure Documentation

◆ atest_t

struct atest_t

Definition at line 37 of file draw_tests.h.

Data Fields
unsigned char enable
unsigned char method
unsigned char compval
unsigned char keep

◆ dtest_t

struct dtest_t

Definition at line 44 of file draw_tests.h.

Data Fields
unsigned char enable
unsigned char pass

◆ ztest_t

struct ztest_t

Definition at line 49 of file draw_tests.h.

Data Fields
unsigned char enable
unsigned char method

Macro Definition Documentation

◆ ATEST_METHOD_ALLFAIL

#define ATEST_METHOD_ALLFAIL   0

Definition at line 13 of file draw_tests.h.

◆ ATEST_METHOD_ALLPASS

#define ATEST_METHOD_ALLPASS   1

Definition at line 14 of file draw_tests.h.

◆ ATEST_METHOD_LESS

#define ATEST_METHOD_LESS   2

Definition at line 15 of file draw_tests.h.

◆ ATEST_METHOD_LESS_EQUAL

#define ATEST_METHOD_LESS_EQUAL   3

Definition at line 16 of file draw_tests.h.

◆ ATEST_METHOD_EQUAL

#define ATEST_METHOD_EQUAL   4

Definition at line 17 of file draw_tests.h.

◆ ATEST_METHOD_GREATER_EQUAL

#define ATEST_METHOD_GREATER_EQUAL   5

Definition at line 18 of file draw_tests.h.

◆ ATEST_METHOD_GREATER

#define ATEST_METHOD_GREATER   6

Definition at line 19 of file draw_tests.h.

◆ ATEST_METHOD_NOTEQUAL

#define ATEST_METHOD_NOTEQUAL   7

Definition at line 20 of file draw_tests.h.

◆ ATEST_KEEP_ALL

#define ATEST_KEEP_ALL   0

Definition at line 22 of file draw_tests.h.

◆ ATEST_KEEP_ZBUFFER

#define ATEST_KEEP_ZBUFFER   1

Definition at line 23 of file draw_tests.h.

◆ ATEST_KEEP_FRAMEBUFFER

#define ATEST_KEEP_FRAMEBUFFER   2

Definition at line 24 of file draw_tests.h.

◆ ATEST_KEEP_ALPHA

#define ATEST_KEEP_ALPHA   3

Definition at line 25 of file draw_tests.h.

◆ DTEST_METHOD_PASS_ZERO

#define DTEST_METHOD_PASS_ZERO   0

Destination Alpha Testing

Definition at line 28 of file draw_tests.h.

◆ DTEST_METHOD_PASS_ONE

#define DTEST_METHOD_PASS_ONE   1

Definition at line 29 of file draw_tests.h.

◆ ZTEST_METHOD_ALLFAIL

#define ZTEST_METHOD_ALLFAIL   0

Depth Test

Definition at line 32 of file draw_tests.h.

◆ ZTEST_METHOD_ALLPASS

#define ZTEST_METHOD_ALLPASS   1

Definition at line 33 of file draw_tests.h.

◆ ZTEST_METHOD_GREATER_EQUAL

#define ZTEST_METHOD_GREATER_EQUAL   2

Definition at line 34 of file draw_tests.h.

◆ ZTEST_METHOD_GREATER

#define ZTEST_METHOD_GREATER   3

Definition at line 35 of file draw_tests.h.

Function Documentation

◆ draw_scissor_area()

qword_t * draw_scissor_area ( qword_t *  q,
int  context,
int  x0,
int  x1,
int  y0,
int  y1 
)

Scissoring pixel test area

Definition at line 273 of file draw_environment.c.

References draw_scissor_area(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_SCISSOR.

Referenced by draw_scissor_area().

◆ draw_pixel_test()

qword_t * draw_pixel_test ( qword_t *  q,
int  context,
atest_t atest,
dtest_t dtest,
ztest_t ztest 
)

Pixel Testing

Definition at line 286 of file draw_environment.c.

References draw_pixel_test(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_TEST.

Referenced by draw_pixel_test().

◆ draw_disable_tests()

qword_t * draw_disable_tests ( qword_t *  q,
int  context,
zbuffer_t z 
)

Disable pixel testing defaults

Definition at line 120 of file draw.c.

References draw_disable_tests(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_TEST.

Referenced by draw_disable_tests().

◆ draw_enable_tests()

qword_t * draw_enable_tests ( qword_t *  q,
int  context,
zbuffer_t z 
)

Enable pixel testing defaults

Definition at line 135 of file draw.c.

References draw_enable_tests(), GIF_FLG_PACKED, GIF_REG_AD, and GS_REG_TEST.

Referenced by draw_enable_tests().