Whether SpriteProgram.dispose has run.
Deletes the GL program (§83). Idempotent.
Only call this on a live context — see UnlitProgram.dispose.
Uploads one render item's world matrix. See setViewProjection.
Points the map sampler at texture unit.
Uploaded whenever the pipeline becomes current rather than once at creation:
glUniform* writes into the currently bound program, and binding one at
creation time would leave the renderer's program state to be guessed at from
two places instead of one (decision, WP-3a.3). One uniform1i per pipeline
switch is not a cost worth optimizing.
Uploads a straight-alpha RGBA tint (§55, §66) scaled by the material's
opacity — see UnlitProgram.setColor for the multiply and why the
default reproduces the previous upload exactly. Accepts the material's own
live array; the values are copied into scratch, so the material keeps
ownership of its array.
Uploads projection * view for the viewport being drawn. Column-major, so
transpose is false — the engine's Matrix4 layout is already GL's (§7b).
Uniform values live in the program object, so one upload per viewport holds for every sprite drawn into it, even if the unlit pipeline draws in between.
Makes this the current program. Call before any upload below.
StaticcreateCompiles and links the sprite program on gl.
Fails exactly as UnlitProgram.create does — see it, and
createLinkedProgram, for the contract; the messages name "sprite" instead
of "unlit" and the §89 code is the same.
The textured-quad pipeline (§55) — the backend's second and last program in the §106a tier.
It shares
gl-geometry.ts's vertex arrays with UnlitProgram: both declare the position stream at POSITION_ATTRIBUTE_LOCATION and the uv stream at UV_ATTRIBUTE_LOCATION.Spriteauthors the atlas cell onto that stream; this program interpolates it.Owns its GL objects and nothing else — the texture it samples belongs to
gl-texture.ts's cache, and the renderer re-creates this program on context restore exactly as it re-creates the unlit one (§61).