UNPKG

@luma.gl/engine

Version:

3D Engine Components for luma.gl

18 lines 874 B
import { Device, Shader, ShaderProps } from '@luma.gl/core'; /** Manages a cached pool of Shaders for reuse. */ export declare class ShaderFactory { static readonly defaultProps: Required<ShaderProps>; /** Returns the default ShaderFactory for the given {@link Device}, creating one if necessary. */ static getDefaultShaderFactory(device: Device): ShaderFactory; readonly device: Device; readonly destroyPolicy: 'unused' | 'never'; private readonly _cache; /** @internal */ constructor(device: Device); /** Requests a {@link Shader} from the cache, creating a new Shader only if necessary. */ createShader(props: ShaderProps): Shader; /** Releases a previously-requested {@link Shader}, destroying it if no users remain. */ release(shader: Shader): void; private _hashShader; } //# sourceMappingURL=shader-factory.d.ts.map