struct Gloop::UniformLocation
- Gloop::UniformLocation
- Struct
- Value
- Object
Overview
Reference to an active uniform in the current program.
NOTE If the active program is changed, existing references to uniforms will change to the new program, which may not exist.
Included Modules
Defined in:
gloop/uniform_location.crConstructors
-
.new(context : Context, location : Int32)
Creates a reference to an active uniform.
Instance Method Summary
-
#location : Int32
Location of the uniform.
-
#value=(value : Float32)
Sets the value of the uniform.
-
#value=(value : Float64)
Sets the value of the uniform.
-
#value=(value : Int32)
Sets the value of the uniform.
-
#value=(value : UInt32)
Sets the value of the uniform.
Constructor Detail
Creates a reference to an active uniform.
Instance Method Detail
def value=(value : Float32)
#
Sets the value of the uniform.
Assumes the uniform is a 32-bit, floating-point number.
- OpenGL function:
glUniform1f
- OpenGL version: 2.0
def value=(value : Float64)
#
Sets the value of the uniform.
Assumes the uniform is a 64-bit, floating-point number.
- OpenGL function:
glUniform1d
- OpenGL version: 4.0
def value=(value : Int32)
#
Sets the value of the uniform.
Assumes the uniform is a 32-bit, signed integer.
- OpenGL function:
glUniform1i
- OpenGL version: 2.0
def value=(value : UInt32)
#
Sets the value of the uniform.
Assumes the uniform is a 32-bit, unsigned integer.
- OpenGL function:
glUniform1ui
- OpenGL version: 3.0