setValue

fun setValue(location: Int, value: Any, type: Shader.DataType): ERROR CLASS: Unresolved name: memScoped

Sets a value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The value to set. Supported types are from the DataType enum.

type

The type of the uniform variable.


fun setValue(uniformName: String, value: Any, type: Shader.DataType)

Sets a value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The value to set. Supported types are from the DataType enum.

type

The type of the uniform variable.


fun setValue(location: Int, value: Matrix4)

Sets a matrix value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The matrix value to set.


fun setValue(uniformName: String, value: Matrix4)

Sets a matrix value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The matrix value to set.


fun setValue(location: Int, value: Texture2D)

Sets a texture value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The texture value to set.


fun setValue(uniformName: String, value: Texture2D)

Sets a texture value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The texture value to set.


fun setValue(location: Int, value: Boolean)

Sets a boolean value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The boolean value to set.


fun setValue(uniformName: String, value: Boolean)

Sets a boolean value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The boolean value to set.


fun setValue(location: Int, value: Float): ERROR CLASS: Unresolved name: memScoped

Sets a float value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The float value to set.


fun setValue(uniformName: String, value: Float)

Sets a float value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The float value to set.


fun setValue(location: Int, value: Double)

Sets a double value for a shader uniform variable. Performs conversion to float.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The double value to set.


fun setValue(location: Int, value: Int): ERROR CLASS: Unresolved name: memScoped

Sets an integer value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The integer value to set.


fun setValue(uniformName: String, value: Int)

Sets an integer value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The integer value to set.


fun setValue(location: Int, value: ERROR CLASS: Symbol not found for UInt): ERROR CLASS: Unresolved name: memScoped

Sets an unsigned integer value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The unsigned integer value to set.


fun setValue(uniformName: String, value: ERROR CLASS: Symbol not found for UInt)

Sets an unsigned integer value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The unsigned integer value to set.


fun setValue(location: Int, value: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>): ERROR CLASS: Unresolved name: memScoped

Sets a 2D Vector (Pair) value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The vec2 value to set.


fun setValue(uniformName: String, value: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>)

Sets a 2D Vector (Pair) value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The vec2 value to set.


fun setValue(location: Int, value: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>): ERROR CLASS: Unresolved name: memScoped

Sets a 3D Vector (Triple) value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The vec3 value to set.


fun setValue(uniformName: String, value: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>)

Sets a 3D Vector (Triple) value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The vec3 value to set.


fun setValue(location: Int, value: Quadruple<Float, Float, Float, Float>): ERROR CLASS: Unresolved name: memScoped

Sets a 4D Vector (Quadruple) value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The vec4 value to set.


fun setValue(uniformName: String, value: Quadruple<Float, Float, Float, Float>)

Sets a 4D Vector (Quadruple) value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The vec4 value to set.


fun setValue(location: Int, value: IntArray)

Sets an int array value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The int array value to set. Supported sizes are 2, 3, and 4.


fun setValue(uniformName: String, value: IntArray)

Sets an int array value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The int array value to set. Supported sizes are 2, 3, and 4.


fun setValue(location: Int, value: FloatArray)

Sets a float array value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The float array value to set. Supported sizes are 2, 3, and 4.


fun setValue(uniformName: String, value: FloatArray)

Sets a float array value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The float array value to set. Supported sizes are 2, 3, and 4.


fun setValue(location: Int, value: Color)

Sets a color value for a shader uniform variable.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The color value to set.


fun setValue(uniformName: String, value: Color)

Sets a color value for a shader uniform variable by name.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The color value to set.


fun setValue(location: Int, value: Any?)

Sets a value for a shader uniform variable. The type of the value is inferred at runtime. Supported types are: Boolean, Float, Double, Int, UInt, Pair, Triple, Quadruple, Matrix4, Texture2D, and Color.

Parameters

location

The location of the uniform variable. You can get the location using getLocation.

value

The value to set.


fun setValue(uniformName: String, value: Any)

Sets a value for a shader uniform variable by name. The type of the value is inferred at runtime. Supported types are: Boolean, Float, Double, Int, UInt, Pair, Triple, Quadruple, Matrix4, Texture2D, and Color.

Parameters

uniformName

The name of the uniform variable. You can find the uniform names in the shader code.

value

The value to set.