UNPKG

pex-context

Version:

Modern WebGL state wrapper for PEX: allocate GPU resources (textures, buffers), setup state pipelines and passes, and combine them into commands.

17 lines (16 loc) 780 B
export default createTexture; export type TextureOptionsData = HTMLImageElement | HTMLVideoElement | HTMLCanvasElement; export type TextureTarget = WebGLRenderingContext.TEXTURE_2D | WebGLRenderingContext.TEXTURE_CUBE_MAP | WebGL2RenderingContext.TEXTURE_2D_ARRAY | WebGL2RenderingContext.TEXTURE_3D; export type TextureOptions = import("./types.js").PexResource; export type Texture2DArrayOptions = import("./types.js").PexResource; export type TextureCubeOptions = import("./types.js").PexResource; declare function createTexture(ctx: any, opts: any): { class: string; handle: any; target: any; width: number; height: number; _update: typeof updateTexture; _dispose(): void; }; declare function updateTexture(ctx: any, texture: any, opts: any): any;