Creates a new WebGLContextWrapper instance.
The WebGL2 rendering context to wrap
The HTML canvas element associated with the context
Readonly
canvasOptional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl1Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Optional
Readonly
webgl2Checks if the current context is WebGL2.
True if WebGL2, false if WebGL1
Draws arrays with instancing support.
The primitive mode (GL_TRIANGLES, etc.)
The starting index in the enabled arrays
The number of vertices to draw
The number of instances to draw
Sets the draw buffers for multiple render targets.
Array of render buffer targets to draw to
Draws elements with instancing support.
The primitive mode (GL_TRIANGLES, etc.)
The number of indices to draw
The type of the index values
The offset in the index buffer
The number of instances to draw
Checks if a WebGL1 extension is not supported.
The WebGL extension to check
True if the extension is not supported, false otherwise
Checks if a WebGL1 extension is supported.
The WebGL extension to check
True if the extension is supported, false otherwise
Sets the viewport using a Vector4 with optimization to avoid redundant state changes.
Vector4 containing left, top, width, and height
A wrapper class for WebGL context that provides enhanced functionality and state management. This class handles WebGL state optimization, extension management, and provides convenience methods for common WebGL operations while maintaining compatibility with both WebGL1 and WebGL2.