The WebGLRenderer instance that owns this wrapper.
The WebGLRenderer instance that owns this wrapper.
List of the indexes of available texture units. Used in setting uniforms.
The list of texture units available to the WebGLRenderingContext.
Binds a texture to a texture unit.
This will change the active texture unit to the given unit,
unless forceActive is false.
This should be the only way to bind a texture to a unit.
The texture to bind, or null to unbind the unit.
The texture unit to bind the texture to.
Optionalforce: booleanIf true, it will bind the texture even if it is already bound. Default false.
OptionalforceActive: booleanIf true, it will change the active texture unit to the given unit even if it is already active. Otherwise, it will only change the active texture unit if it is not already active. Default true.
Set specific texture units to specific textures.
The active texture unit may change to accommodate the bindings.
The textures to bind. Null values will be unbound. Undefined values will be skipped.
Optionalforce: booleanIf true, it will bind all textures, even if they are already bound. Default false.
Initializes the texture units to null. The active texture unit
will be 0 after this runs.
This populates every texture unit with a 1x1 texture. This stops WebGL errors on MacOS. These textures are not wrapped, and are not intended to be used, so the texture units are recorded as null.
Unbinds all textures from all texture units. This will change the active texture unit to 0.
A wrapper for the WebGLRenderingContext's texture units. It tracks which textures are bound to which units, and provides binding utilities.