create a renderer
The parameters to initialise the renderer.
Whether to render an alpha channel. This property is passed to the rendering context.
Whether to automatically clear the buffers before render.
The WebGL2RenderingContext.bindVertexArray() method of the WebGL 2 API binds a passed WebGLVertexArrayObject object to the buffer.
Whether to clear the color bit
The WebGL2RenderingContext.createVertexArray() method of the WebGL 2 API creates and initializes a WebGLVertexArrayObject object that represents a vertex array object (VAO) pointing to vertex array data and which provides names for different sets of vertex data.
Stores the current geometry being rendered. Used to otimise geo rendering.
The WebGL2RenderingContext.deleteVertexArray() method of the WebGL 2 API deletes a given WebGLVertexArrayObject object.
Whether to render a depth buffer. This property is passed to the rendering context.
The pixel aspect ratio of the renderer.
The WebGL2RenderingContext.drawArraysInstanced() method of the WebGL 2 API renders primitives from array data like the gl.drawArrays() method. In addition, it can execute multiple instances of the range of elements.
The WebGL2RenderingContext.drawBuffers() method of the WebGL 2 API defines draw buffers to which fragment colors are written into. The draw buffer settings are part of the state of the currently bound framebuffer or the drawingbuffer if no framebuffer is bound.
The WebGL2RenderingContext.drawElementsInstanced() method of the WebGL 2 API renders primitives from array data like the gl.drawElements() method. In addition, it can execute multiple instances of a set of elements.
Stores the enabled extensions
The WTCGL rendering context.
Whether the context we've retrieved is webGL2 or not.
Stored device parameters such as max allowable units etc.
Whether to use premultiplied alphs. This property is passed to the rendering context.
The rendering state. Allows us to avoid redundant calls on methods used internally
Whether to render a stencil buffer. This property is passed to the rendering context.
The WebGL2RenderingContext.vertexAttribDivisor() method of the WebGL 2 API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with
Sets the active texture value
Sets the cull face bit
Sets the depth function bit
Sets the depth mask bit
Sets the front face bit
Enables specific WebGL capabilities for this context. See MDN for more details
The ID of the capability to enable
Finds and enables a webGL extension and, if it has a corresponding function, returns that.
The extension identifier.
Optional
webgl2Func: stringThe name of the webGL2 function to return.
Optional
extFunc: stringThe name of the webGL1 functiont to return.
Renders a scene
Sets a blending function for use in the application. See MDN for more information
The function to be used in RGB models
The functions to be used for both RGB and alpha models
Set's various blend functions are used for blending pixel calculations See MDN for more details If alpha functions are provided, this will call gl.blendFuncSeparate, otherwise blendFunc
A WebGL_API.Types specifying a multiplier for the RGB source blending factors.
A WebGL_API.Types specifying a multiplier for the RGB destination blending factors.
Optional
srcAlpha: numberA WebGL_API.Types specifying a multiplier for the alpha source blending factor.
Optional
dstAlpha: numberA WebGL_API.Types specifying a multiplier for the alpha destination blending factor.
Create a renderer. This is responsible for bringing together the whole state and, eventually, rendering to screen.