import { Device } from '../../Device'; import { Texture, TextureDataOption, TextureOptions, TextureSourceOption } from '../../resources/Texture'; /** * Describes a texture object. * * @public */ export declare class TextureGL extends Texture { readonly device: Device; readonly handle: WebGLTexture; /** * Determines whether this is a cubemap face */ readonly isFace: boolean; /** * Constructs an instance of a Texture. * * @remarks * The options are passed down to {@link Texture.setup} */ constructor(device: Device, options?: TextureOptions); create(): this; /** * Releases all resources and notifies the device that the texture is being destroyed. */ destroy(): this; /** * Binds the texture to the gl context. * * @returns the previously bound texture handle */ bind(): this; /** * Sets the texture source from data array or buffer * * @remarks * Sets current {@link source} property to null and uses given data as texture source. * If data is a plain javascript array or an ArrayBuffer, a TypedArray is instantiated * based on current {@link pixelType} respecting WebGL rules for array buffers types. * * If width and height are given they are used as new texture widht and height values. * * Given data must match the width and heigth otherwise WebGL will complain. * * @param data - The texture data to be set * @param width - The new texture width * @param height - The new texture height */ setData(data: TextureDataOption, width?: number, height?: number): this; setFaces(faces: TextureSourceOption[]): this; /** * Updates the texture from current image source. * * @remarks * This method is called automatically from inside the {@link ShaderUniform} * * When loading textures from url or html image/video elements * the texture data might not be available right away because the * resources may still be downloading. * * A call to this method instructs the texture to check the * download state of the resources and when available to update * the texture data. When data has arrived the {@link Texture.ready} * property will be set to `true` */ update(): boolean; private updateCubemap; private updateSource; } //# sourceMappingURL=TextureGL.d.ts.map