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.

54 lines (53 loc) 1.56 kB
export default createContext; /** * Create a context object * @param {import("./types.js").PexContextOptions & import("pex-gl").Options} [options] * @returns {ctx} */ declare function createContext(options?: import("./types.js").PexContextOptions & any): { /** * The `RenderingContext` returned by `pex-gl` * @memberof ctx */ gl: any; /** * Max capabilities and extensions availability. See {@link #capabilitiesTable|Capabilities Table}. * @memberof ctx */ capabilities: { isWebGL2: boolean; maxColorAttachments: number; maxTextureImageUnits: any; maxVertexTextureImageUnits: any; maxVertexAttribs: any; maxTextureSize: any; maxCubeMapTextureSize: any; depthTexture: boolean; shaderTextureLod: boolean; textureFloat: boolean; textureFloatLinear: boolean; textureHalfFloat: boolean; textureHalfFloatLinear: boolean; textureFilterAnisotropic: boolean; sRGB: boolean; disjointTimerQuery: boolean; colorBufferFloat: boolean; colorBufferHalfFloat: boolean; floatBlend: boolean; multiDraw: boolean; drawInstancedBase: boolean; multiDrawInstancedBase: boolean; }; /** * Getter for `gl.drawingBufferWidth` * @memberof ctx * @returns {number} */ readonly width: number; /** * Getter for `gl.drawingBufferHeight` * @memberof ctx * @returns {number} */ readonly height: number; };