

null - create empty texture of specified format.parameters (Object) - GL parameters to be temporarily applied (most of the time, pixelStorage parameters) when updating the texture.offset (Number) - (WEBGL2) offset from start of buffer.format of array (autodetect from type) or.format (GLenum) - format of image data.Can be one of several data types see table below WebGL References gl.generateMipmap setImageData(options : Object) : Texture2D default false.Ĭall to regenerate mipmaps after modifying texture(s) mipmaps (bool) - turn on/off mipmapping.Note: calling resize clears image and mipmaps. If size has changed, reinitializes texture with current format. Pixel store parameters are described in State Management.Ĭall to resize a texture.They constructors all take common parameters, many of which are specified in this document. The constructors for these classes should be used to create textures. It is a base class that provides common methods the the concrete texture classes. The texture class cannot be constructed directly. Texture.getParameter(GL.TEXTURE_MAG_FILTER) Methods constructor(gl : WebGLRenderingContext, props : Object) Sampler parameters can be accessed using Texture.getParameter, e.g: Id - An identifying string that is intended to help debugging. Always 0, unless specified using WebGL 2 buffer constructor. Offset - offset used to create face textures. Height - height of one face of the cube mapįormat - internal format of the face texturesĭataFormat - data format used to create face textures.

Width - width of one face of the cube map

draw ( ) MembersĪ number of read only accessors are available: ) // For ease of use, the `Model` class can bind textures for a draw call
