UNPKG

@tolokoban/tgd

Version:

ToloGameDev library for WebGL2

36 lines 1.11 kB
import { TgdEvent } from "../event"; import { TgdProgram } from "../program"; interface TgdTextureDepthStorage { width: number; height: number; type: "DEPTH_COMPONENT24" | "DEPTH_COMPONENT16" | "DEPTH_COMPONENT32F"; } export declare class TgdTextureDepth { readonly name: string; readonly gl: WebGL2RenderingContext; readonly eventChange: TgdEvent<TgdTextureDepth>; private readonly _texture; private _width; private _height; private static counter; constructor(context: { gl: WebGL2RenderingContext; }, options: Partial<TgdTextureDepthStorage> & { width: number; height: number; }); delete(): void; get width(): number; get height(): number; get glTexture(): WebGLTexture; bind(): void; /** * * @param unit Unit to link the texture to * @param program The program that owns the uniform to update * @param uniformName The uniform that hold the texture */ activate(unit: number, program?: TgdProgram, uniformName?: string): this; } export {}; //# sourceMappingURL=texture-depth.d.ts.map