UNPKG

gl-layer

Version:

A lightweight WebGL setup layer that simplifies renderer management, uniform handling, and cleanup.

30 lines (29 loc) 696 B
export interface WebGLUniform { uniformName: string; webglName: string; } export interface WebGLAttribute { attributeName: string; webglName: string; } export interface ShaderSource { fragmentShaderSource: string; vertexShaderSource: string; } export interface InitializeWebGLParams { gl: WebGLRenderingContext; uniforms?: WebGLUniform[]; attributes?: WebGLAttribute[]; shader: ShaderSource; vertexPositionName?: string; } export interface ProgramInfo { program: WebGLProgram; attribLocations: { vertexPosition: number; [key: string]: number; }; uniformLocations: { [key: string]: WebGLUniformLocation; }; }