Class: AxDeviceShader

AxDeviceShader()

new AxDeviceShader()

Creates a new graphics device shader This constructor shouldn't be called explicity, but instead the graphics device should create its shader
Source:

Methods

AddOperation(shadingOp, colorOp)

Adds an operation to the shader
Parameters:
Name Type Description
shadingOp AxShadingOperation Type of shader to add
colorOp AxColorOperation Type of color operation
Source:

ClearOperations()

Clears all operation from the shader
Source:

GetOperation(index, shadingOp, colorOp)

Gets an existing operation's parameters
Parameters:
Name Type Description
index Integer Index of an existing operation to be set
shadingOp AxShadingOperation Returned type of shading operation. Returns as wrapped in an object
colorOp AxColorOperation Returned type of color operation. Returns as wrapped in an object
Source:

GetOperationCount() → {Integer}

Gets the number of operations the shader has
Source:
Returns:
The number of operations the shader has
Type
Integer

GetParameterAddress(parameterName) → {Integer}

Gets the address of a paramter of the shader
Parameters:
Name Type Description
parameterName AxString Name of the parameter to get address for
Source:
Returns:
Address of the parameter with the given name
Type
Integer

SetOperation(index, shadingOp, colorOp)

Sets an existing operation's parameters
Parameters:
Name Type Description
index Integer Index of an existing operation to be set
shadingOp AxShadingOperation Type of shader to add
colorOp AxColorOperation Type of color operation
Source:

SetParameter(address, index, value)

Sets a value to a parameter at the given address at a given index
Parameters:
Name Type Description
address Integer Address of the parameter whose value is to be set
index Integer For indexed parameters, the index to set. For regular paramters should be 0
value Object Value to set to the parameter at the given address and index
Source:

Update(compilationMessage) → {Boolean}

Updates the shader according to its shading operations
Parameters:
Name Type Description
compilationMessage AxString Returned message from the update
Source:
Returns:
True if the update was successful. If the update was unsuccessful, returns true and an error should generally be returned in compliationMessage
Type
Boolean

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