Gfx GX Fn GXProject - wowjinxy/libPorpoise GitHub Wiki
GXProject
- Category:
Transformation and Matrix
- Matrix Status:
Implemented
- Matrix Notes: Verified modelview+projection+viewport projection math using
GXGetProjectionv and GXGetViewportv parameter formats.
- 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/GXProject.html and SDK source in reference/gx/GXTransform.c.
- Runtime checked in
src/gx/pc_gx.c:
- Performs model->eye transform via 3x4 modelview matrix.
- Branches on
pm[0] (GX_PERSPECTIVE vs GX_ORTHOGRAPHIC) with SDK-equivalent clip-space formulas.
- Computes screen coordinates using viewport scale/offset exactly in
GXGetViewportv parameter layout.
- Uses null guards in PC path for all input/output pointers (fail-soft behavior).
- Result: function-level parity is correct for projection math and parameter conventions; no runtime code changes needed.