gs.Effect Class
A class to handle Open/GLSL shader-based effect. It is important to not confuse this class with gs.GraphicEffect, which is for own custom shader-based effects. This class is for internal usage only and encapsulates the OpenGL shader program. You should not create instance of this class manually.
Constructor
gs.Effect
()
Item Index
Methods
setFloatValue
(
-
name -
value
Sets a float uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
valueNumber- The float value to set as the uniform's value.
setFloatValues
(
-
name -
value
Sets an array of floats.
Parameters:
-
nameString- The name of the uniform to set.
-
valueNumber- The float values to set as the uniform's value.
setIntegerValue
(
-
name -
value
Sets an integer uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
valueNumber- The integer value to set as the uniform's value.
setIntegerValues
(
-
name -
values
Sets an array of integers.
Parameters:
-
nameString- The name of the uniform to set.
-
valuesNumber- The integer values to set as the uniform's value.
setMatrixValue
(
-
name -
value
Sets a mat4 uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
valueNumber- The matrix to set as the uniform's value.
setVector2Value
(
-
name -
v1 -
v2
Sets a vec2 uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
v1Number- The x-coordinate of the vec2 value to set as the uniform's value.
-
v2Number- The y-coordinate of the vec2 value to set as the uniform's value.
setVector2Value
(
-
name -
values
Sets an uniform array of vec2 values.
Parameters:
-
nameString- The name of the uniform to set.
-
valuesNumber- An array of coordinate-pairs to set as the uniforms value.
setVector3Value
(
-
name -
v1 -
v2 -
v3
Sets a vec3 uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
v1Number- The x-coordinate of the vec3 value to set as the uniform's value.
-
v2Number- The y-coordinate of the vec3 value to set as the uniform's value.
-
v3Number- The z-coordinate of the vec3 value to set as the uniform's value.
setVector3Value
(
-
name -
values
Sets an uniform array of vec3 values.
Parameters:
-
nameString- The name of the uniform to set.
-
valuesNumber- An array of coordinate-pairs to set as the uniforms value.
setVector4Value
(
-
name -
v1 -
v2 -
v3 -
v4
Sets a vec4 uniform value.
Parameters:
-
nameString- The name of the uniform to set.
-
v1Number- The x-coordinate of the vec4 value to set as the uniform's value.
-
v2Number- The y-coordinate of the vec4 value to set as the uniform's value.
-
v3Number- The z-coordinate of the vec4 value to set as the uniform's value.
-
v4Number- The w-coordinate of the vec4 value to set as the uniform's value.
setVector4Value
(
-
name -
values
Sets an uniform array of vec4 values.
Parameters:
-
nameString- The name of the uniform to set.
-
valuesNumber- An array of coordinate-pairs to set as the uniforms value.
