Class: AxDynamicShaderBlockDefinitions


new AxDynamicShaderBlockDefinitions()

Creates a new colleciton of shader definitions The colleciton is, in fact, a dictionary of code blocks, where each code block is defined by a name, which acts as a key and represents the semanting meaning of the block This way, when a block of code with a specific semantic purpose is required,


GetCode() → {AxString}

Generates all the source code from the whole collection of definitions
The full source code, compiled by concatenating all the definitions in the collection

ProvideDefinition(name, code) → {Boolean}

Provides a code definition with a name, which acts as a key. The name acts as a key for the definition and if there is already a definition with the same name, no new definition is added, the definitions collection remains the same and the return value is false is false.\ This method ensures that the code, which is to be defined is available and doesn't duplicate
Name Type Description
name AxString The name of the code definition. It acts as a key and as a semantic meaning for the code, which is to be defined. If the name is undefined, null or empty, the definition is added unconditionally and isn't checked against for later definitions
code AxString The actual source code of the definition
True if a definition was successfully added. False otherwise, for example if a definition with the same name was already defined.

Documentation generated by JSDoc 3.5.3 on Wed Jan 17 2018 17:06:56 GMT+0200 (FLE Standard Time)