modern-canvas
Version:
A JavaScript WebGL rendering engine. only the ESM.
32 lines (31 loc) • 1.51 kB
TypeScript
import type { TextureLike } from '../../shared';
import type { GlRenderer } from '../GlRenderer';
import type { GlRenderingContext, GlTextureLocation } from '../types';
import type { GlTextureUploader } from './GlTextureUploader';
import { GlSystem } from '../system';
import { GlTexture } from './GlTexture';
export declare class GlTextureSystem extends GlSystem {
uploaders: Record<string, GlTextureUploader>;
readonly textures: Map<number, TextureLike>;
readonly glTextures: Map<number, GlTexture>;
protected _mapFormatToInternalFormat: Record<string, number>;
protected _mapFormatToType: Record<string, number>;
protected _mapFormatToFormat: Record<string, number>;
protected _premultiplyAlpha: boolean;
maxTextureSize: number;
maxTextureImageUnits: number;
protected _location: GlTextureLocation;
current: (TextureLike | null)[];
install(renderer: GlRenderer): void;
protected _updateContext(gl: GlRenderingContext): void;
getGlTexture(texture: TextureLike): GlTexture;
protected _createGlTexture(texture: TextureLike): GlTexture;
bind(texture?: TextureLike | null, location?: number): void;
protected _activateLocation(location: number): void;
unbind(source: TextureLike | number): void;
protected _sourceUnload(source: TextureLike): void;
updateStyle(texture: TextureLike, firstCreation?: boolean): void;
updateGpuTexture(texture: TextureLike): void;
updateMipmap(texture: TextureLike): void;
reset(): void;
}