Gfx GX Fn GXSetScissor - wowjinxy/libPorpoise GitHub Wiki
GXSetScissor
Category: Clipping and Culling
Matrix Status: Implemented
Matrix Notes: Verified against docs; stores GX screen-space scissor (xOrig/yOrig/wd/ht), applies GL scissor in GX top-left coordinates, and flushes pending vertices before state switch.
Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
Manual root: reference/rvlsdk/man/en_US/gx
Primary SDK source area: demos/PikminDemo/src/gx (GC-style Dolphin GX source)
Notes:
libPorpoise Implementation
Runtime implementation area: src/gx
Public API surface: include/dolphin/gx
Notes:
SDK vs Porpoise Diff
Signature parity:
Behavioral parity:
Known divergence:
Validation Checklist
Working Notes
Docs checked against reference/man/gfx/gx/Culling/GXSetScissor.html and SDK source in reference/gx/GXTransform.c.
SDK behavior:
Accepts (xOrig, yOrig, wd, ht) in screen coordinates with top-left origin.
Writes scissor register state immediately (with in-begin guard via CHECK_IN_BGN).
Runtime parity update in src/gx/pc_gx.c:
Added pc_gx_flush_if_begin_complete() at start of GXSetScissor so queued geometry is emitted before scissor-state change.
Keeps stored GX scissor rectangle and GL Y-flip mapping unchanged.
🗂️ Page Index for this GitHub Wiki