Skip to content

Types

Renderer ​

Defined in: createRenderer.js:127

A program with its vertex arrays and uniforms, made by createRenderer.

Properties ​

PropertyTypeDescription
bindUniform(name, value) => voidSets a uniform. Numbers, arrays and typed arrays all work, and array uniforms can be set by their plain name. For a sampler, pass a texture or a framebuffer target: it's bound to the sampler's own texture unit when the renderer draws. A unit number still works for textures bound by hand. Names the shader doesn't use are ignored.
bindVAOs() => voidUses the program and binds its vertex array and textures. Call before drawing.
delete() => voidFrees the program, vertex arrays, transform feedback objects and the buffers made from attribute data. The renderer does nothing afterwards.
outputsRecord<string, WebGLBuffer>With transform feedback: the buffers holding the latest output, by attribute name.
programWebGLProgramThe linked program.
render(options?) => voidSets the viewport and draws.
setUniforms(values) => voidbindUniform for several uniforms at once.
uniformsRecord<string, ActiveUniform>The program's active uniforms, by name.