ps2dev / gsKit

gsKit is a C interface to the PS2 Graphics Synthesizer
Other
103 stars 27 forks source link

Expose SCISSOR register to enable custom scissor boxes #48

Closed kbhomes closed 2 years ago

kbhomes commented 2 years ago

Exposes the SCISSOR register functionality to the gsKit end user. Looks like gsKit initialization was already using the SCISSOR register, but setting it to the full display bounds. This PR allows for setting a custom scissor box, and resetting it to the full display with GS_SCISSOR_RESET.

I also added a custom scissor box call to the basic sample program. Before and after screenshots are attached -- the red triangle has its drawing clipped due to the scissor box.

gsKit-scissor-before gsKit-scissor-after

(This scissor box functionality will be super useful to the PS2 ImGui backend I'm implementing! 😊)

uyjulian commented 2 years ago

Looks good, merging