Renderer
Defined in: createRenderer.js:127
A program with its vertex arrays and uniforms, made by createRenderer.
Properties
| Property | Type | Description |
|---|---|---|
bindUniform | (name, value) => void | Sets 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 | () => void | Uses the program and binds its vertex array and textures. Call before drawing. |
delete | () => void | Frees the program, vertex arrays, transform feedback objects and the buffers made from attribute data. The renderer does nothing afterwards. |
outputs | Record<string, WebGLBuffer> | With transform feedback: the buffers holding the latest output, by attribute name. |
program | WebGLProgram | The linked program. |
render | (options?) => void | Sets the viewport and draws. |
setUniforms | (values) => void | bindUniform for several uniforms at once. |
uniforms | Record<string, ActiveUniform> | The program's active uniforms, by name. |