1 line
2.7 KiB
Plaintext
1 line
2.7 KiB
Plaintext
{"version":3,"file":"GlProgramData.mjs","sources":["../../../../../src/rendering/renderers/gl/shader/GlProgramData.ts"],"sourcesContent":["/**\n * @private\n */\nexport class IGLUniformData\n{\n public location: WebGLUniformLocation;\n public value: number | boolean | Float32Array | Int32Array | Uint32Array | boolean[];\n}\n\n/**\n * Helper class to create a WebGL Program\n * @private\n */\nexport class GlProgramData\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: Record<string, 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: Record<string, any>;\n\n /** A hash that stores where UBOs are bound to on the program. */\n public uniformBlockBindings: Record<string, any>;\n\n /** A hash for lazily-generated uniform uploading functions. */\n public uniformSync: Record<string, 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: Record<string, 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.uniformBlockBindings = {};\n }\n\n /** Destroys this program. */\n public destroy(): void\n {\n this.uniformData = null;\n this.uniformGroups = null;\n this.uniformDirtyGroups = null;\n this.uniformBlockBindings = null;\n this.program = null;\n }\n}\n"],"names":[],"mappings":";AAGO,MAAM,cACb,CAAA;AAGA,CAAA;AAMO,MAAM,aACb,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,uBAAuB,EAAC,CAAA;AAAA,GACjC;AAAA;AAAA,EAGO,OACP,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,oBAAuB,GAAA,IAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,OAAU,GAAA,IAAA,CAAA;AAAA,GACnB;AACJ;;;;"} |