ShaderProgram

* Base shader class. * It inherits ShaderRenderer service.

Members

Functions

addUniform
typeof(this) addUniform(string name)

* Add a new shader uniform to the uniforms map using its name. * Returns reference to this so it can be used in a stream.

bind
typeof(this) bind()

* Bind the shader into video memory. * Returns reference to this so it can be used in a stream.

bindAttribute
typeof(this) bindAttribute(string name)

* Bind a shader attribute into video memory. * Returns reference to this so it can be used in a stream.

compileShaders
typeof(this) compileShaders(string vertexShader, string fragmentShader)

* Compile vertex and fragment shader using its code. * Returns reference to this so it can be used in a stream.

getId
uint getId()

* Returns the shader id.

linkShaders
typeof(this) linkShaders()

* Link shaders into video memory. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, bool value)

* Load a bool uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, int value)

* Load an int uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, uint value)

* Load an uint uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, float value)

* Load a float uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, Vector2F vector)

* Load a vec2 uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, Vector3F vector)

* Load vec3 uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, Vector4F vector)

* Load vec4 uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(int locationID, Matrix4F matrix)

* Load Matrix4F uniform using location id and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, bool value)

* Load bool uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, int value)

* Load int uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, uint value)

* Load uint uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, float value)

* Load float uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, Vector2F vector)

* Load Vector2F uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, Vector3F vector)

* Load Vector3F uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, Vector4F vector)

* Load Vector4F uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

loadUniform
typeof(this) loadUniform(string name, Matrix4F matrix)

* Load Matrix4F uniform using uniform name and value. * Returns reference to this so it can be used in a stream.

unbind
typeof(this) unbind()

* Unbind the shader from video memory. * Returns reference to this so it can be used in a stream.

Inherited Members

From ShaderRenderer

attributeCount
int attributeCount;
enableVertexAttributeArray
R enableVertexAttributeArray(int vaoID)

* Enable vertex attribute array. * Returns reference to this so it can be used in a stream.

disableVertexAttributeArray
R disableVertexAttributeArray()

* Disable vertex attribute array. * Returns reference to this so it can be used in a stream.

render
R render(Model model)

* Step1: Enable vertex attribute array for the model. * Step2: Render a model to the screen by calling render method from model. * Step3: Disable vertex attribute array. * Returns reference to this so it can be used in a stream.

Meta