Class Index | File Index

Classes


Class shader

shader
Defined in: shader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
shader()
Allows you to specify rendering programs usually on your GPU.
Field Summary
Field Attributes Field Name and Description
 
log
Returns any additional logging information from the shader program.
 
Returns a string containing the shader language used by shading programs.
 
Returns the current program status.
Method Summary
Method Attributes Method Name and Description
 
addStage(stage, shader)
Adds a stage to the shader program.
 
Finalizes the programs stages.
Class Detail
shader()
Allows you to specify rendering programs usually on your GPU. Shaders are programs compiled and run during runtime to process graphics data. On backends that support them, they will usually run on dedicated hardware. Since the actual source language of the Shader depends on the Renderer backend, The rules and behavior of how the shader source will vary greatly. For the stock OpenGL backend, the shader language will be a variant of GLSL.
Field Detail
log
Returns any additional logging information from the shader program. If the status Invalid, typically the log will contain information on why.

shaderLanguage
Returns a string containing the shader language used by shading programs. This is dependent on the parameters of the renderer used by / compiled with sandboxe.

status
Returns the current program status. See sandboxe.shader.status
Method Detail
addStage(stage, shader)
Adds a stage to the shader program. If the stage already exists and the program has not been compiled succesfully, this call replaces the old source with this source.
Parameters:
{Number} stage
See sandboxe.shader.stage
{String} shader
data

compile()
Finalizes the programs stages. After this call, the status property will either contain success, meaning the program is now usable, or invalid, meaning compilation failed. In the case of failure, the log property may contain more information as to why the compilation failed.

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 03 2019 18:30:57 GMT-0500 (EST)