Class: SamplerCubeArray

SamplerCubeArray

Array of 2d cube samplers. May reflect an ESSL array-of-samplerCubes uniform variable.
Individual SamplerCube elements are available through the index operator [].

new SamplerCubeArray(size, baseTextureUnit)

Parameters:
Name Type Description
size Number The number of SamplerCube elements in the array.
baseTextureUnit Number The texture unit index of the first element. Other elements are assigned to texture units contiguously.

Methods


at(index)

Returns a SamplerCube object that captures an element of the array. The sampler is a view on the original data, not a copy.
Parameters:
Name Type Description
index Number Index of the element.
Returns:
view on one of the array's elements
Type
SamplerCube

commit(gl, uniformLocation)

Specifies, to WebGL, the texture unit indices of all samplers in the array, and binds textures of the array elements.
Parameters:
Name Type Description
gl WebGLRenderingContext rendering context
uniformLocation WebGLUniformLocation location of the uniform variable in the currently used WebGL program

set(textureArray)

Assigns textures.
Parameters:
Name Type Description
textureArray Array.<Object> | Array.<WebGLTexture> An array of WebGL textures, or of objects with the `glTexture` property that stores a WebGL texture.