Create a two-dimensional array texture.
The rendering context of the texture.
UnsupportedOperationError if a texture cannot be created.
Create a two-dimensional array texture with a fixed size. This has better performance than a variable-sized texture.
The rendering context of the texture.
The number of levels in the texture.
The internal format of the texture.
The width of the texture.
The height of the texture.
The depth of the texture.
UnsupportedOperationError if a texture cannot be created.
TextureFormatError if the given format is unsized.
The base mipmap level of this texture.
The comparison function of this texture.
The comparison mode of this texture.
The depth of this texture.
The format of this texture.
ImmutableError if the format of an immutable-format texture is changed.
The height of this texture.
Whether or not this is an immutable-format texture.
Whether or not this texture is texture complete.
The desired maximum anisotropy of this texture.
UnsupportedOperationError if the anisotropic filtering extension is not available.
BadValueError if set to a higher value than the current system supports.
The maximum mipmap level of this texture.
The maximum level of detail of this texture.
The minification filter of this texture.
The minimum level of detail of this texture.
The width of this texture.
Make this texture into an immutable-format texture.
Optional
levels: numberThe number of levels in the texture, or undefined
for one level.
Optional
format: TextureFormatThe internal format of the texture, or undefined
to keep the current format (defaults to RGBA
).
Optional
dims: number[]The dimensions of the texture, or undefined
to keep the current dimensions.
TextureFormatError if the given format is unsized.
BadValueError if the given dimensions are too small for the given number of levels.
Copy the data in a framebuffer into one of this texture's mips.
The framebuffer to copy into the mip, or null
for the default framebuffer.
Optional
level: numberThe level of the mip within its mipmap. Defaults to the top mip.
Optional
face: CubeFaceThe mipmap that the mip belongs to. Ignored by non-cubemap textures.
Optional
bounds: Rectangle | PrismThe bounds of the mip to be updated. Defaults to the entire mip if not set.
Optional
type: TextureDataTypeThe type of the given data. Must be compatible with the format of the given data.
Optional
unpackAlignment: 1 | 2 | 4 | 8The alignment to use when unpacking the data, or undefined
to let this be automatically determined.
Optional
area: Rectangle | PrismThe area of the framebuffer to copy into the mip.
TextureFormatError if the given data type is incompatible with this texture's format.
Copy the data in a buffer into one of this texture's mips.
The buffer to copy into the mip.
The level of the mip within its mipmap. Defaults to the top mip.
The mipmap that the mip belongs to. Ignored by non-cubemap textures.
The bounds of the mip to be updated. Defaults to the entire mip if not set.
The type of the given data. Must be compatible with the format of the given data.
The alignment to use when unpacking the data, or undefined
to let this be automatically determined.
The number of bytes of data to copy from the buffer.
The offset in bytes from the start of the buffer to start copying at.
TextureFormatError if the given data type is incompatible with this texture's format.
Copy data into one of this texture's mips.
Optional
data: TexImageSourceThe data to copy into the mip.
Optional
level: numberThe level of the mip within its mipmap. Defaults to the top mip.
Optional
face: CubeFaceThe mipmap that the mip belongs to. Ignored by non-cubemap textures.
Optional
bounds: Rectangle | PrismThe bounds of the mip to be updated. Defaults to the entire mip if not set.
Optional
type: TextureDataTypeThe type of the given data. Must be compatible with the format of the given data.
Optional
unpackAlignment: 1 | 2 | 4 | 8The alignment to use when unpacking the data, or undefined
to let this be automatically determined.
TextureFormatError if the given data type is incompatible with this texture's format.
Copy the data in an array into one of this texture's mips.
The array to copy into the mip.
Optional
level: numberThe level of the mip within its mipmap. Defaults to the top mip.
Optional
face: CubeFaceThe mipmap that the mip belongs to. Ignored by non-cubemap textures.
Optional
bounds: Rectangle | PrismThe bounds of the mip to be updated. Defaults to the entire mip if not set.
Optional
type: TextureDataTypeThe type of the given data. Must be compatible with the format of the given data.
Optional
unpackAlignment: 1 | 2 | 4 | 8The alignment to use when unpacking the data, or undefined
to let this be automatically determined.
Optional
offset: numberThe offset from the start of the array to start copying at, or undefined
for the start of the array.
Optional
length: numberThe number of elements to copy from the array, or undefined
for the entire array.
TextureFormatError if the given data type is incompatible with this texture's format.
A two-dimensional array texture.
See
WebGLTexture