API Docs for: 1.4.0
Show:

Shaders Module

GLSL ES Shaders are used for WebGL rendering. ShaderPair objects encapsulate GLSL ES vertex and fragment shader programs. ShaderPairs contain the GLSL code, provide an interface to uniforms and attributes, and have the ability to link and compile the shaders. The ShaderManager keeps track of each ShaderPair, and controls which one is bound for use at any particular time. Only the ShaderManager can create ShaderPairs. When a renderer (see note on renderes below) requests a ShaderPair the ShaderManager will either 1) Return a reference to an already instantiated ShaderPair, and set the GL state to use the shader program or 2) Return a reference to a new ShaderPair, which will be linked and compiled and bound for use. All ShaderPairs must be housed as properties of the Kiwi.Shaders object.

Kiwi.Renderer objects use a ShaderPair to draw. They must request a ShaderPair from the ShaderManager. Many renderers may use the same ShaderPair. Some renderers may at different times use multiple ShaderPairs (only one is possible at any given time)