OptionalclientPolls sync without blocking (timeout is 0 in this package — a
blocking client wait would be the stall the fence path exists to
avoid). Returns one of ALREADY_SIGNALED / TIMEOUT_EXPIRED /
CONDITION_SATISFIED / WAIT_FAILED (PICKING_GL, gl-picking.ts).
OptionaldeleteOptionalfenceInserts a fence the GPU signals when prior commands complete.
OptionalgetCopies the bound PIXEL_PACK_BUFFER's bytes back to the CPU.
OptionalreadReads one rectangle of the bound framebuffer (§71's id read-back; RFC
0005 Q5's adopted disposition: the single-texel path, deliberately not
§61's readPixels(target, region) — that member still waits on
Rectangle2). into is a destination view for the direct, stalling
form, or a byte offset into the bound PIXEL_PACK_BUFFER for the
non-stalling fence form — WebGL 2's own two overloads, collapsed.
OptionalbeginStarts TIME_ELAPSED_EXT accumulation into query.
OptionalbindBinds framebuffer for drawing, or null for the default drawing buffer
— the canvas (§61).
target is always GL.FRAMEBUFFER in this tier: WebGL 2 can bind separate
read and draw framebuffers, and the packet that needs that split (a
multisample resolve blit, readPixels off a non-current target) is the one
that will pass anything else.
Reports whether the bound framebuffer is usable. Narrowed to number
(WebIDL GLenum); the caller compares it against GL.FRAMEBUFFER_COMPLETE
and refuses to draw into anything else.
Enables or disables writing each colour channel (§57's colorWrite).
Per-channel in GL; this tier only ever sets all four together, because §57
declares one boolean. A per-channel mask is what a later colorWrite
carrying a channel set would drive.
OptionalcreateAllocates an elapsed-time query object.
OptionaldeleteReleases query (§83).
Enables or disables writing to the depth buffer (§57's depthWrite).
Separate from enable(DEPTH_TEST), which is what §57's depthTest
controls: the usual transparent surface tests depth and does not write
it, and only two GL entry points can say that.
OptionalendStops the active query of target.
OptionalgenerateBuilds the full mip chain of the bound texture (§77's mipmaps; R-30b, 2026-08-21).
Optional, and its presence is the capability — the stance this package
takes for every entry point that is not needed to draw a frame. WebGL 2 has
it unconditionally; a double written before this field existed does not,
and a texture asking for mipmaps: true against such a context uploads
with one level and an in-level min filter (gl-texture.ts) rather than
leaving GL a texture it would treat as incomplete and sample as black.
Every existing double therefore keeps compiling and keeps issuing the call
sequence it always did.
OptionalgetRequests an extension object, or null where the device has none (§62's
capability tiers; R-30b).
Optional for WebglContext.generateMipmap's reason, and called
lazily: the one caller today is the texture cache, on the first texture
that asks for anisotropy above 1, so a context that never meets one issues
no query at all and every already-recorded GL transcript is unchanged. The
return is unknown because this package must not name a lib.dom type;
the caller checks it for null and reads the enum it needs off GL.
OptionalgetReads QUERY_RESULT_AVAILABLE (boolean) or QUERY_RESULT (nanoseconds)
from a completed query. Typed unknown so the caller narrows, same as
WebglContext.getParameter.
OptionalgetOptional on structural test contexts; required by opt-in node std140.
Sets the stencil comparison for both faces (§67's func, ref,
readMask).
Both faces, always: this backend leaves CULL_FACE disabled and draws
every polygon with one state, so the two-sided stencilFuncSeparate — the
entry point a shadow-volume or a non-zero-winding fill pass needs — would
be a second way to say the same thing until such a pass exists.
Sets the bits a stencil write — including clear(STENCIL_BUFFER_BIT) —
may change (§67's writeMask).
The clear is the trap and is why this is a mirrored value rather than a
per-draw call: GL masks the clear with this too, so a frame that ended
with a read-only mask material would clear nothing at all the next time
round. webgl-renderer.ts puts it back before every clear, and with no
stencil in the frame that comparison issues no call.
Sets what a stencil-fail, depth-fail, and pass store, for both faces (WebglContext.stencilFunc's reason).
The nine-argument, explicitly sized form — the only one this tier calls.
pixels is null for a texture with no CPU-side data, which allocates
zero-filled storage (§77).
OptionaltexUpdates existing RGBA8 storage without reallocating it.
Uploads one float uniform.
Added with §59's standard pipeline (R-13, 2026-08-08), which is the first
one to carry a scalar the shader reads on its own — metalness and
roughness. Packing the two into a vec3 would have kept this interface
unchanged; two named scalars are what the shader actually declares, and
this interface exists precisely so a new entry point is an explicit,
reviewable growth of the package's GL budget rather than a silent one (see
the module header).
OptionaluniformUploads one mat3 uniform, column-major.
Added with the lit/standard normal-matrix hoist (2026-09-09): those two
vertex stages used to derive transpose(inverse(mat3(model))) per vertex,
and now consume a per-draw 9-float upload. Growing this interface is the
same explicit budget bump uniform1f documented when §59 landed — a new
entry point rather than packing the 3×3 into a mat4. The node-material
pipeline still pads mat3 to mat4 so its transcripts stay untouched.
The GL 2 entry points this package calls — the whole of them.
Grouped by the module that uses each group, because that grouping is the package's internal layering: shaders and uniforms here, buffers and vertex arrays in
gl-geometry.ts, per-frame state and draws inwebgl-renderer.ts.Return types are narrowed relative to the WebIDL where the WebGL 2 specification pins the answer for the specific enumerant this package passes —
getShaderParameter(shader, COMPILE_STATUS)is aGLboolean, so it is typedboolean— and leftunknownwhere it does not (WebglContext.getParameter), so the caller has to narrow.