benilla-re systems structs docs

CSimpleTexture::SetTexture

function · ui · primitive

Address
0x770200 · 245 bytes, up to 0x7702f4
Meaning
Loads a texture file with wrap, filter and shader index, or answers 1 for the file already held
Confidence
verified, proof one
Finding
ui/texture#settexture

Finding: SetTexture in ui: texture colour and drawing

SetTexture(file) loads the image with the wrap flag off, the filter value at 0x878cf0 and shader index 0, and answers the number 1, or nil when the load fails. SetTexture(r, g, b[, a]) with a number sets the solid fill instead. SetTexture(nil), a value that is not a string or a number, and the empty string "" all clear the image, keep the shader slot and answer 1. Setting the file the texture already shows is a no-op that keeps everything else. A different file also replaces the pixel-shader slot with the shader of index 0, which is none, so it ends desaturation.

The derivation is in the doc.

Callers 19

Callees 8

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