24#define GSKIT_ALLOC_SYSBUFFER 0x00
26#define GSKIT_ALLOC_USERBUFFER 0x01
29#define GSKIT_ALLOC_ERROR 0x00
32#define GS_GIF_BLOCKSIZE 0x7fff
35#define GS_VRAM_BLOCKSIZE_8K 8192
37#define GS_VRAM_BLOCKSIZE_256 256
39#define GS_VRAM_TBWALIGN 64
41#define GS_VRAM_TBWALIGN_CLUT 128
44#define GS_CMODE_REPEAT 0x00
46#define GS_CMODE_CLAMP 0x01
48#define GS_CMODE_REGION_CLAMP 0x02
50#define GS_CMODE_REGION_REPEAT 0x03
52#define GS_CMODE_RESET 0xFF
55#define GS_SCISSOR_RESET 0x00
58#define GS_ZTEST_OFF 0x01
60#define GS_ZTEST_ON 0x02
62#define GS_ATEST_OFF 0x03
64#define GS_ATEST_ON 0x04
66#define GS_D_ATEST_OFF 0x05
68#define GS_D_ATEST_ON 0x06
71#define GS_FILTER_NEAREST 0x00
73#define GS_FILTER_LINEAR 0x01
76#define GS_CLUT_STORAGE_CSM1 0x00
78#define GS_CLUT_STORAGE_CSM2 0x01
83 s32 x __attribute__ ((packed));
84 s32 y __attribute__ ((packed));
85 s32 z __attribute__ ((packed));
int gsKit_add_finish_handler(int(*finish_callback)(int))
Installs a finish interrupt handler.
void gsKit_switch_context(GSGLOBAL *gsGlobal)
void gsKit_setactive(GSGLOBAL *gsGlobal)
Sets Your Active Framebuffer.
void gsKit_queue_exec_real(GSGLOBAL *gsGlobal, GSQUEUE *Queue)
Specific Draw Queue "Execution" (Kicks the Queue passed for the second argument).
int gsKit_add_vsync_handler(int(*vsync_callback)(int))
Installs a vsync interrupt handler (vblank_start).
void gsKit_queue_reset(GSQUEUE *Queue)
Reset specified drawqueue to it's initial state (Useful for clearing the Persistent Queue).
int gsKit_add_hsync_handler(int(*hsync_callback)(int))
Installs a hsync interrupt handler (hblank_start).
void gsKit_remove_finish_handler(int callback_id)
Removes a finish interrupt handler.
void gsKit_get_field(GSGLOBAL *gsGlobal)
Sets gsGlobal->EvenOrOdd depending on current field drawing.
void gsKit_vram_clear(GSGLOBAL *gsGlobal)
GS VRAM Clear.
void gsKit_vsync_nowait(void)
Initiates a vsync but doesn't block.
void gsKit_set_clamp(GSGLOBAL *gsGlobal, u8 Preset)
void gsKit_queue_set(GSGLOBAL *gsGlobal, GSQUEUE *Queue)
Set Current Draw Queue.
void gsKit_clear(GSGLOBAL *gsGlobal, u64 Color)
u32 gsKit_vram_alloc(GSGLOBAL *gsGlobal, u32 size, u8 type)
GS VRAM Allocation.
void gsKit_set_scissor(GSGLOBAL *gsGlobal, u64 ScissorBounds)
void gsKit_set_dither(GSGLOBAL *gsGlobal)
Enables/Disables dithering, with the gsGlobal Dithering option.
void gsKit_remove_vsync_handler(int callback_id)
Removes a vsync interrupt handler.
void gsKit_hsync_wait(void)
Blocks until a HSync.
void gsKit_display_buffer(GSGLOBAL *gsGlobal)
void gsKit_set_texfilter(GSGLOBAL *gsGlobal, u8 FilterMode)
Sets the Texture Filtering Parameters.
GSQUEUE gsKit_set_finish(GSGLOBAL *gsGlobal)
Append the Current Queue with a GS_FINISH Register.
void gsKit_set_dither_matrix(GSGLOBAL *gsGlobal)
Sets the Dither Matrix Setting.
void gsKit_lock_buffer(GSGLOBAL *gsGlobal)
void gsKit_free_ucab(void *p)
Free UCAB buffer in GSQUEUE, internal use only.
void gsKit_remove_hsync_handler(int callback_id)
Removes a hsync interrupt handler.
void gsKit_set_primalpha(GSGLOBAL *gsGlobal, u64 AlphaMode, u8 PerPixel)
Sets the Alpha Blending Parameters.
void gsKit_queue_free(GSGLOBAL *gsGlobal, GSQUEUE *Queue)
Free Allocated Memory for Draw Queue.
GSFLIP_MODE
Flip mode for gsKit_hires_flip_ext.
@ GSFLIP_VSYNC
Wait for vsync before flipping.
@ GSFLIP_RATE_LIMIT_2
Limit to 30fps (2 vsyncs per frame).
@ GSFLIP_RATE_LIMIT_1
Limit to 60fps (1 vsync per frame).
@ GSFLIP_DIRECT
Flip immediately, no vsync wait.
void gsKit_set_drawfield(GSGLOBAL *gsGlobal, u8 field)
Sets the GS to draw only on even/odd/both fields (from libgraph).
void gsKit_set_test(GSGLOBAL *gsGlobal, u8 Preset)
int gsKit_lock_status(GSGLOBAL *gsGlobal)
void gsKit_vsync_wait(void)
Blocks Until a VSync.
void gsKit_queue_init(GSGLOBAL *gsGlobal, GSQUEUE *Queue, u8 mode, int size)
Initialize a Draw Queue (Allocates memory for the Queue).
void gsKit_queue_exec(GSGLOBAL *gsGlobal)
Normal User Draw Queue "Execution" (Kicks Oneshot and Persistent Queues).
void gsKit_set_texclut(GSGLOBAL *gsGlobal, gs_texclut texClut)
Sets the CLUT position specfications.
void gsKit_mode_switch(GSGLOBAL *gsGlobal, u8 mode)
Set Current Draw Queue (Between GS_ONESHOT and GS_PERSISTENT).
void gsKit_unlock_buffer(GSGLOBAL *gsGlobal)
void gsKit_finish(void)
Blocks until FINISH is triggered.
void gsKit_sync_flip(GSGLOBAL *gsGlobal)
void * gsKit_alloc_ucab(int size)
Allocate UCAB buffer in GSQUEUE, internal use only.
Basic X/Y/Z Vertex Structure.