CGxDevice::SetProjection
function · gx · primitive
- Address
0x5925e0· 43 bytes, up to0x59260a- Signature
void __thiscall (CGxDevice *this, const float *matrix)- Meaning
- Copies 16 floats to the projection record at +0xf50
- Confidence
- verified, proof one
- Finding
- gx/draw#projection-matrix
Finding: Projection matrix in gx: drawing
0x5a11d0 (Direct3D) and 0x59fe20 (OpenGL) take a pointer to a 4 by 4 float matrix, copy it, change it for the device and load it as the projection. Direct3D first stores the caller's matrix at [dev+0xf50] (0x5925e0), divides all sixteen elements by element 11 when that is neither 1 nor near 0, and rewrites elements 10 and 14 to the device depth range, in one form when element 15 is 0 and another when it is not. OpenGL negates elements 8 to 11, the third row. Both then multiply the matrix by a diagonal of 0.2, 0.2, 0.2, 1 when capability bit 8 of [dev+0x269c] is clear and element 15 is not 1.
The derivation is in the doc.
Callers 2
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.