benilla-re systems structs docs

CGxDeviceD3d::SetView

function · gx · orchestration

Address
0x5a1450 · 40 bytes, up to 0x5a1477
Signature
void __thiscall (CGxDeviceD3d *this, const float *matrix)
Meaning
Records a view matrix and sets it as the Direct3D view transform
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 0

None by a direct call or jump.

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.