I thought I'd share an example of 3D perspective projection onto a flat textured quad with the Psy-Q SDK. The source code includes detailed comments (pretty close to 'i++' redundancy) and binaries (including a PS-EXE and BIN/CUE pair).
UPDATE: I have since studied the correct way to implement an OT. Do not follow this demo if you're learning the basics of setting up a double-buffered environment.
The program features:
- Use of an Ordering Table (not that it's really necessary).
- A struct-based double-buffer setup.
- GTE perspective rotation-translation matrices modifiable by controller input (D-Pad, cross & triangle).
- The display V-Shifts upwards on my SCPH-7502 (PAL). If anyone has a suggestion for that, that's cool!
- The pSX emulator does not draw the poly at all. Loads my texture pattern and CLUT into VRAM, but it's a bit picky with my poly for some reason. Still learning.
Here it is! Preview:
Thanks, and happy coding!