struct Gloop::Program::UniformLocation
- Gloop::Program::UniformLocation
- Struct
- Value
- Object
Overview
Reference to an active uniform from a program.
Included Modules
Defined in:
gloop/program/uniform_location.crConstructors
-
.new(context : Context, name : Name, 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.
-
#value_as(type : Float32.class) : Float32
Retrieves the value of a uniform.
-
#value_as(type : Float64.class) : Float64
Retrieves the value of a uniform.
-
#value_as(type : Int32.class) : Int32
Retrieves the value of a uniform.
-
#value_as(type : UInt32.class) : UInt32
Retrieves the value of a uniform.
Constructor Detail
Creates a reference to an active uniform.
Instance Method Detail
Sets the value of the uniform.
Assumes the uniform is a 32-bit, floating-point number.
- OpenGL function:
glProgramUniform1f
- OpenGL version: 4.1
Sets the value of the uniform.
Assumes the uniform is a 64-bit, floating-point number.
- OpenGL function:
glProgramUniform1d
- OpenGL version: 4.1
Sets the value of the uniform.
Assumes the uniform is a 32-bit, signed integer.
- OpenGL function:
glProgramUniform1i
- OpenGL version: 4.1
Sets the value of the uniform.
Assumes the uniform is a 32-bit, unsigned integer.
- OpenGL function:
glProgramUniform1ui
- OpenGL version: 4.1
Retrieves the value of a uniform.
- OpenGL function:
glGetUniformfv
- OpenGL version: 2.0
Retrieves the value of a uniform.
- OpenGL function:
glGetUniformdv
- OpenGL version: 4.0
Retrieves the value of a uniform.
- OpenGL function:
glGetUniformiv
- OpenGL version: 2.0
Retrieves the value of a uniform.
- OpenGL function:
glGetUniformuiv
- OpenGL version: 3.0