benilla-re systems structs docs

SetDeviceViewport

function · gx · primitive

Address
0x58af60 · 216 bytes, up to 0x58b037
Meaning
Sets the device viewport and its depth range
Confidence
verified, proof one
Finding
ui/modelview#viewport-and-clamp

Finding: Viewport and clamp in ui: Model frames, camera and paint

The viewport is the frame's rectangle as fractions of the screen: each edge is divided by the screen's layout extent, and a fraction at or past 1 becomes 1, at or below 0 becomes 0, and NaN becomes 1. The fractions are multiplied by the enclosing viewport's right and top fractions only, which is exact when that viewport starts at the origin, as the interface's does. The projection is built over the unclamped rectangle, so a frame partly off the screen is squashed into the visible strip, not cropped. If the width or the height fraction is under 2^-22 the paint draws nothing.

The derivation is in the doc.

Callers 21

Callees 2

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