import { Device } from '../Device'; import { ShaderType, ShaderTypeOption } from '../enums'; /** * Constructor options for {@link Shader} * * @public */ export interface ShaderOptions { /** * The shader source code */ source?: string; /** * The shader type e.g. VertexShader or Fragment shader */ type: ShaderTypeOption; /** * A {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader | WebGLShader} object to be reused */ handle?: WebGLShader; } /** * A wrapper class around the {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader | WebGLShader} * * @public */ export declare abstract class Shader { static readonly OptionsSymbol: unique symbol; /** * A unique id */ readonly uid: string; /** * The graphics device */ abstract readonly device: Device; /** * The shader source code */ source: string; /** * The shader type as a WebGL constant */ type: ShaderType; /** * The shader type as readable name e.g. VertexShader or FragmentShader */ typeName: string; /** * Whether compilation was successful */ compiled: boolean; /** * Releases the shader handle */ abstract destroy(): this; /** * Compiles the shader source code */ abstract compile(): this; /** * Creates a clone of this shader */ clone(): Shader; } //# sourceMappingURL=Shader.d.ts.map