2.63 kBSource Map (JSON)View Raw
1{"version":3,"file":"GLProgram.mjs","sources":["../../src/shader/GLProgram.ts"],"sourcesContent":["import type { Dict } from '@pixi/utils';\n\n/**\n * @private\n */\nexport class IGLUniformData\n{\n location: WebGLUniformLocation;\n value: number | boolean | Float32Array | Int32Array | Uint32Array | boolean[];\n}\n\n/**\n * Helper class to create a WebGL Program\n * @memberof PIXI\n */\nexport class GLProgram\n{\n /** The shader program. */\n public program: WebGLProgram;\n\n /**\n * Holds the uniform data which contains uniform locations\n * and current uniform values used for caching and preventing unneeded GPU commands.\n */\n public uniformData: Dict<any>;\n\n /**\n * UniformGroups holds the various upload functions for the shader. Each uniform group\n * and program have a unique upload function generated.\n */\n public uniformGroups: Dict<any>;\n\n /** A hash that stores where UBOs are bound to on the program. */\n public uniformBufferBindings: Dict<any>;\n\n /** A hash for lazily-generated uniform uploading functions. */\n public uniformSync: Dict<any>;\n\n /**\n * A place where dirty ticks are stored for groups\n * If a tick here does not match with the Higher level Programs tick, it means\n * we should re upload the data.\n */\n public uniformDirtyGroups: Dict<any>;\n\n /**\n * Makes a new Pixi program.\n * @param program - webgl program\n * @param uniformData - uniforms\n */\n constructor(program: WebGLProgram, uniformData: {[key: string]: IGLUniformData})\n {\n this.program = program;\n this.uniformData = uniformData;\n this.uniformGroups = {};\n this.uniformDirtyGroups = {};\n this.uniformBufferBindings = {};\n }\n\n /** Destroys this program. */\n destroy(): void\n {\n this.uniformData = null;\n this.uniformGroups = null;\n this.uniformDirtyGroups = null;\n this.uniformBufferBindings = null;\n this.program = null;\n }\n}\n"],"names":[],"mappings":"AAKO,MAAM,cACb,CAAA;AAGA,CAAA;AAMO,MAAM,SACb,CAAA;AAAA,EAkCI,WAAA,CAAY,SAAuB,WACnC,EAAA;AACI,IAAA,IAAA,CAAK,OAAU,GAAA,OAAA,CAAA;AACf,IAAA,IAAA,CAAK,WAAc,GAAA,WAAA,CAAA;AACnB,IAAA,IAAA,CAAK,gBAAgB,EAAC,CAAA;AACtB,IAAA,IAAA,CAAK,qBAAqB,EAAC,CAAA;AAC3B,IAAA,IAAA,CAAK,wBAAwB,EAAC,CAAA;AAAA,GAClC;AAAA,EAGA,OACA,GAAA;AACI,IAAA,IAAA,CAAK,WAAc,GAAA,IAAA,CAAA;AACnB,IAAA,IAAA,CAAK,aAAgB,GAAA,IAAA,CAAA;AACrB,IAAA,IAAA,CAAK,kBAAqB,GAAA,IAAA,CAAA;AAC1B,IAAA,IAAA,CAAK,qBAAwB,GAAA,IAAA,CAAA;AAC7B,IAAA,IAAA,CAAK,OAAU,GAAA,IAAA,CAAA;AAAA,GACnB;AACJ;;;;"}
\No newline at end of file