Class: AxDynamicShaderBlockDefinitions

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,
Source:

Methods

GetCode() → {AxString}

Generates all the source code from the whole collection of definitions
Source:
Returns:
The full source code, compiled by concatenating all the definitions in the collection
Type
AxString

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
Parameters:
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
Source:
Returns:
True if a definition was successfully added. False otherwise, for example if a definition with the same name was already defined.
Type
Boolean

Documentation generated by JSDoc 3.5.3 on Mon Feb 19 2018 20:39:26 GMT+0200 (FLE Standard Time)