import type { GLCat } from './GLCat'; declare type WebGL1 = WebGLRenderingContext; declare type WebGL2 = WebGL2RenderingContext; /** * It's a WebGLTexture. */ export declare class GLCatTexture { protected __glCat: GLCat; protected __texture: WebGLTexture; protected __width: number; protected __height: number; protected get __target(): GLenum; /** * Its own texture. */ get texture(): WebGLTexture; /** * Its own texture. Shorter than [[GLCatTexture.textured]] */ get raw(): WebGLTexture; /** * Its width. */ get width(): number; /** * Its height. */ get height(): number; /** * Create a new GLCatTexture instance. */ constructor(glCat: GLCat, texture: WebGLTexture); /** * Bind this texture. */ bind(): void; bind(callback: (texture: this) => T): T; /** * Dispose the texture. */ dispose(): void; /** * Specify how to filter the texture. */ textureFilter(): void; textureFilter(filter: number): void; textureFilter(filterMag: number, filterMin: number): void; /** * Specify how to wrap the texture. */ textureWrap(): void; textureWrap(wrap: number): void; textureWrap(wrapS: number, wrapT: number): void; /** * Initialize the texture. */ texStorage2D(width: number, height: number, { level, format }?: { level?: number | undefined; format?: number | undefined; }): void; /** * Return a value for the passed parameter name. * See: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParameter */ getParameter(pname: GLenum): any; /** * Specify the pixel storage modes. * See: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/pixelStorei */ pixelStorei(pname: GLenum, param: number | boolean): void; /** * Set new data into this texture. */ setTexture(source: TexImageSource): void; /** * Set new data into this texture. * This function uses TypedArray. If you want to source image data, use `GLCat.setTexture()` instead. */ setTextureFromArray(width: number, height: number, source: ArrayBufferView | null, { internalformat, format, type }?: { internalformat?: number | undefined; format?: number | undefined; type?: number | undefined; }): void; /** * Copy pixels from current framebuffer to given texture. */ copyTexture(width: number, height: number): void; /** * Set [ 0, 0, 0, 0 ] to this texture. * Useful for temporary use.. */ setZeroTexture(): void; } export {};