GxApplyViewportD3D
function · unassigned · host
- Address
0x5a1100· 206 bytes, up to0x5a11cd- Signature
void __thiscall (void *this)- Meaning
- Builds a D3DVIEWPORT9 from the viewport fractions and calls SetViewport
- Confidence
- verified, proof one
- Finding
- gx/device#direct3d-clear-and-viewport
Finding: Direct3D clear and viewport in gx: the device
0x5a17d0(mask), slot +0x6c, clears: bit 0 of the mask is D3DCLEAR_TARGET, bit 1 D3DCLEAR_ZBUFFER; the colour is [dev+0x324] (default 0xff000000) unless bit 8 of the capability word is clear, when it cycles through three sine waves; depth 1.0, stencil 0; the viewport is applied first when dirty. 0x5a1100 builds the D3DVIEWPORT9 from the fractions at [dev+0xf38] to +0xf4c: X = ftol([+0xf38] * W), Y = ftol((1 - [+0xf44]) * H), Width = ftol([+0xf3c] * W) - X, Height = ftol((1 - [+0xf40]) * H) - Y, MinZ and MaxZ from +0xf48 and +0xf4c.
The derivation is in the doc.
Callers 2
- CGxDeviceD3d::Clear unassigned
- 0x5a1e70 gx
Callees 2
- __ftol crt
- CGxDevice::DrawRect gx
Calls and jumps by a bare address, from tables/calls.tsv.