The WebGLRenderer to create the WebGLGlobalWrapper for.
The WebGLRenderer this WebGLGlobalWrapper is associated with.
The current state of the WebGL global state.
Sets the global WebGL state. Parameters are updated on the
WebGLRenderingContext only if they are defined in the input state,
and different from the current state.
When force is true, and state is defined, parameters on state
are always set, regardless of the current state.
When force is true, and state is undefined, the current state is
used to reset all the parameters.
Optionalstate: WebGLGlobalParametersThe state to set. If undefined, the current state is used when force is true.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
OptionalvaoLast: booleanIf true, the VAO will be set last.
Otherwise, it will be set first. This is useful when performing state
changes that will affect a VAO, such as bindings.elementArrayBuffer. Default false.
Updates the bindings state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the active texture unit state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the vertex array buffer state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the index array buffer state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the framebuffer state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the program state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the renderbuffer state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the blend state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the blend color.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the blend enabled state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the blend equation state.
Equations are always treated as separate.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the blend function state.
Functions are always treated as separate.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the color clear value.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the color writemask.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the cull face state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the depth test state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the scissor state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the scissor box state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the scissor enabled state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the stencil state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the stencil clear state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the stencil enabled state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the stencil function state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the stencil operation state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the texturing state, which takes effect when creating a texture.
This includes flipY and premultiplyAlpha.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the texture flipY state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the texture premultiplyAlpha state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the vertex array object state.
Note that the VAO is automatically affected by
bindings of elementArrayBuffer and any attribute settings,
as written in WebGL. When binding the VAO, ensure that other
bindings come before or after, as you intend.
When using update, the VAO is set first by default.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Updates the viewport state.
The state to set.
Optionalforce: booleanIf true, the state will be set regardless of the current state. Default false.
Wrapper for the WebGL global state.