The WebGLRenderer instance that owns this wrapper.
Mip level of the texture.
Filtering of the texture.
Filtering of the texture.
Wrapping mode of the texture.
Wrapping mode of the texture.
Which format does the texture use.
pixel data.
Width of the texture in pixels.
Height of the texture in pixels.
Optionalpma: booleanDoes the texture have premultiplied alpha? Default true.
OptionalforceSize: booleanIf true it will use the width and height passed to this method, regardless of the pixels dimension. Default false.
OptionalflipY: booleanSets the UNPACK_FLIP_Y_WEBGL flag the WebGL Texture uses during upload. Default true.
The texture unit this texture will be bound to in the current rendering batch.
This should be set by the batcher. It is a quick way to tell whether this texture has been included in the batch. If it is -1, it has not.
Sets the UNPACK_FLIP_Y_WEBGL flag the WebGL Texture uses during upload.
Whether to use the width and height properties, regardless of pixel dimensions.
Which format does the texture use.
Height of the texture in pixels.
Whether this is used as a RenderTexture.
Filtering of the texture.
Filtering of the texture.
Mip level of the texture.
Pixel data. This is the source data used to create the WebGLTexture.
Does the texture have premultiplied alpha?
The WebGLRenderer this WebGLTexture belongs to.
The __SPECTOR_Metadata property of the WebGLTexture,
used to add extra data to the debug SpectorJS integration.
The WebGLTexture that this wrapper is wrapping.
This property could change at any time. Therefore, you should never store a reference to this value. It should only be passed directly to the WebGL API for drawing.
Width of the texture in pixels.
Wrapping mode of the texture.
Wrapping mode of the texture.
Creates a WebGLTexture from the given parameters.
This is called automatically by the constructor. It may also be called again if the WebGLTexture needs re-creating.
Deletes the WebGLTexture from the GPU, if it has not been already.
Resizes the WebGLTexture to the new dimensions. This will destroy the contents of the texture.
The new width of the WebGLTexture.
The new height of the WebGLTexture.
Updates the WebGLTexture from an updated source.
This should only be used when the source is a Canvas or Video element.
Because textures usually change into something complex and unique, this method forces all properties to update without checking.
The source to update the WebGLTexture with.
The new width of the WebGLTexture.
The new height of the WebGLTexture.
Should the WebGLTexture set UNPACK_MULTIPLY_FLIP_Y?
The new wrapping mode for the WebGLTexture.
The new wrapping mode for the WebGLTexture.
The new minification filter for the WebGLTexture.
The new magnification filter for the WebGLTexture.
The new format for the WebGLTexture.
Wrapper for a WebGL texture, containing all the information that was used to create it.
A WebGLTexture should never be exposed outside the WebGLRenderer, so the WebGLRenderer can handle context loss and other events without other systems having to be aware of it. Always use WebGLTextureWrapper instead.