import { Context } from './context'; export declare class ExtensionsHash { protected static readonly WEBGL_BACKENDS: Array; protected static readonly WEBGL_EXTENSIONS_BY_BACKEND: Map; /** * All known WebGL extensions (regardless of WebGL version). When new extensions become known, a new internal * version has to be created, comprising all extensions again (some removed, some added w.r.t. previous versions). */ protected static readonly EXTENSIONS_BY_VERSION: Map; /** * Hash versioning is used to account for future, yet unknown/unpublished extensions while maintaining support for * existing hashes. */ protected static readonly LATEST_VERSION = 0; protected static readonly BASE64_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+"; /** * Encodes a number of bitfield semantics (of 6 bits) into a base64 character. * @param base64 - Bitfield of 6 bits (as number). */ protected static encode64(bitfield: number): string; /** * Decodes a single base64 encoded character to a number of bitfield semantics. * @param base64 - Single base64 encoded character (string). */ protected static decode64(base64: string): number; /** * Generates a hash that encodes the contexts webgl backend and extension support. This is intended to be queried * whenever support for a given context on a foreign client is due. The hash can be used as masquerade input. * @param backend - WebGL backend: 'webgl1' or 'webgl2'. * @param supported - Array of supported extensions to be encoded. */ static encode(backend: Context.BackendType, supported: Array): string; /** * Decodes a hash into a WebGL backend and supported extensions. * @param hash - Versioned extension hash. * @returns - Tuple of webgl backend and an array of extensions. */ static decode(hash: string): [string, Array]; /** * For a given set of extensions, this generates the complementary set of extensions for a given backend. * @param backend - WebGL backend: 'webgl1' or 'webgl2'. * @param extensions - Array of extensions to be complemented to all extensions available to the backend. */ static complement(backend: string, extensions: Array): Array; }