SetDeviceViewport
function · gx · primitive
- Address
0x58af60· 216 bytes, up to0x58b037- 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
- PaintLoadingScreen loadingscreen
- RunFramePass unassigned
- RenderWorldFrame ui
- RedrawInteriorTarget ui
- MinimapFrameRender ui
- BakePortrait ui
- GxuFontFrame unassigned
- AtlasPage::Dump font
- DrawFarBand terrain
- DrawScreenOverlay terrain
- RenderGauss4Pass ffxeffects
- BeginPassTarget ffxeffects
- EndPassTarget ffxeffects
- BeginCurrentFfx ffxeffects
- EndCurrentFfx ffxeffects
- DrawSky lighting
- SimpleModelDraw ui
- CSimpleMessageScrollFrame::DrawCallback ui
- DrawMovie ui
- QueryGlareOcclusion lighting
- DrawGlare lighting
Callees 2
- GxSetViewport gx
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.