Gfx GX Fn GXGetViewportv - wowjinxy/libPorpoise GitHub Wiki
GXGetViewportv
- Category:
Transformation and Matrix
- Matrix Status:
Implemented
- Matrix Notes: Verified viewport vector getter order/size (
GX_VIEWPORT_SZ) and SDK-style strict pointer semantics (no fail-soft NULL guard).
- 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/Transform/GXGetViewportv.html and SDK source in reference/gx/GXTransform.c.
- SDK behavior:
- Copies current viewport state into
vp[0..5] (left, top, width, height, nearz, farz).
- Uses assert-style pointer contract (
ASSERTMSG(vp, GXERR_GET_NULL_PTR)), not fail-soft return.
- Runtime parity update in
src/gx/pc_gx.c:
- Removed defensive
if (!vp) return; from GXGetViewportv.
- Kept output layout/order unchanged and SDK-aligned.