import { GLTexture } from './GLTexture'; export declare class GLCubemap extends GLTexture { protected gl: WebGL2RenderingContext; protected _textureID: number; protected _texture: WebGLTexture; protected mipmap: boolean; protected _width: number; protected _height: number; protected format: number; protected internalformat: number; protected type: number; premultiplyAlpha: boolean; constructor(gl: WebGL2RenderingContext, textureID?: number, width?: number, height?: number, internalFormat?: number, format?: number, type?: number); /** * Uploads this texture to the GPU * @param source {HTMLImageElement|ImageData|HTMLVideoElement} * @param flip - {boolean} flip the texture * @param face {number} * @param level {number} mipmap level */ upload(source: HTMLImageElement | ImageData | HTMLVideoElement, flip?: boolean, face?: number, level?: number): void; /** * Use a data source and uploads this texture to the GPU * @param data {TypedArray} data to upload to the texture * @param width {number} new width of the texture * @param height {number} new height of the texture * @param flip - {boolean} flip the texture * @param face {number} */ uploadData(data: Float32Array, face: number, width?: number, height?: number, flip?: boolean, level?: number): void; /** * Binds the texture * @param location */ bind(location?: number): GLCubemap; unbind(location?: number): GLCubemap; /** * Enables linear filtering */ enableLinearScaling(): void; /** * Enabled nearest neighbour interpolation */ enableNearestScaling(): void; /** * @param linear {boolean} if we want to use linear filtering or nearest neighbour interpolation */ minFilter(linear: boolean): void; /** * @param linear {boolean} if we want to use linear or nearest neighbour interpolation */ magFilter(linear: boolean): void; /** * Enables mipmapping */ enableMipmap(): void; /** * Enables clamping on the texture wo WebGL will not repeat it */ enableWrapClamp(): void; /** * Enable tiling on the texture */ enableWrapRepeat(): void; enableWrapMirrorRepeat(): void; /** * Destroys this texture */ destroy(): void; readonly width: number; readonly height: number; /** * create CubeMap from source data * @param gl * @param source - the src * @param flip - flip the texture default: false * @param premultiplyAlpha - premultiplyAlpha * @param textureID - textureID * @param internalformat * @param format * @param type */ static cubemapFromSource(gl: WebGL2RenderingContext, source: Array | HTMLImageElement | ImageData, flip?: boolean, premultiplyAlpha?: boolean, textureID?: number, internalformat?: number, format?: number, type?: number): GLCubemap; static cubemapFromData(gl: WebGL2RenderingContext, data: Array | Float32Array, width: number, height: number, flip?: boolean, textureID?: number, internalformat?: number, format?: number, type?: number): GLCubemap; }