Internal
Adds global property declarations to vertex and pixel shader code strings. This method is used during shader compilation to inject the necessary uniform declarations for all registered global properties.
The string to append vertex shader property declarations to
The string to append pixel shader property declarations to
The function used to generate property declaration code
Whether the target is WebGL 2.0 (affects syntax generation)
A tuple containing the updated vertex and pixel shader property strings
Internal
Sets up uniform locations for properties that need uniform access in data texture mode. Only sets up uniforms for properties marked with needUniformInDataTextureMode flag.
The unique identifier of the shader program
Internal
Sets up uniform locations for all global properties when using uniform mode. This is used internally by the WebGL resource repository for shader program setup.
The unique identifier of the shader program
Returns the current number of allocated instances for a specific property. This represents how many instances of the property have been created with takeOne().
The name of the property to get the count for
The number of currently allocated instances, or 0 if the property doesn't exist
Retrieves the complete global property structure for a given property name. This includes semantic information, values array, max count, and accessor.
The name of the property to retrieve
The GlobalPropertyStruct for the specified property, or undefined if not found
Gets the memory location offset of a global property in 16-byte aligned units. This is used for data texture mode to determine where properties are stored in memory.
The name of the property to get the offset for
The offset in 16-byte units, or -1 if the property is not found
Retrieves the value of a specific instance of a global property.
The name of the shader semantic property to retrieve
The index of the specific instance to retrieve
The value object for the specified property instance, or undefined if not found
Initializes the GlobalDataRepository with all required global properties. Sets up data structures for camera matrices, lighting, skeletal animation, and other rendering parameters based on the specified process approach.
The processing approach that determines how data is organized and accessed in shaders
Sets uniform values for all global properties in the specified shader program. Iterates through all registered properties and uploads their current values to the GPU.
The WebGL shader program to set uniform values for
Sets the value of a specific instance of a global property. Updates the underlying memory buffer with the new value.
The name of the shader semantic property to update
The index of the specific instance to update
The new value to set for this property instance
Allocates and returns a new instance of the specified global property. Initializes the property with its default value and adds it to the internal tracking.
The name of the shader semantic property to allocate
The newly allocated property value object, or undefined if the property doesn't exist
Static
getReturns the singleton instance of GlobalDataRepository. Creates a new instance if it doesn't exist yet.
The singleton instance of GlobalDataRepository
The repository class that manages global data used throughout the rendering pipeline. This singleton class handles global properties such as camera matrices, lighting data, bone transformations for skeletal animation, and other shared rendering state.