Interface UniformAccess
- All Known Subinterfaces:
MutableUniformAccess
,PostPipeline
,ShaderProgram
- All Known Implementing Classes:
BlitPostStage
,CompositePostPipeline
,CopyPostStage
,DepthFunctionPostStage
,FramebufferPostStage
,MaskPostStage
,ShaderProgramImpl
public interface UniformAccess
Provides read and write access to all uniform variables in a shader program.
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getFloat
(CharSequence name) Retrieves a single float by the specified name.void
getFloats
(CharSequence name, float[] values) Retrieves an array of floats by the specified name.int
getInt
(CharSequence name) Retrieves a single integer by the specified name.void
getInts
(CharSequence name, int[] values) Retrieves an array of integers by the specified name.void
getMatrix
(CharSequence name, org.joml.Matrix2f value) Retrieves a matrix2x2 by the specified namevoid
getMatrix
(CharSequence name, org.joml.Matrix3f value) Retrieves a matrix3x3 by the specified namevoid
getMatrix
(CharSequence name, org.joml.Matrix3x2f value) Retrieves a matrix3x2 by the specified namevoid
getMatrix
(CharSequence name, org.joml.Matrix4f value) Retrieves a matrix4x4 by the specified namevoid
getMatrix
(CharSequence name, org.joml.Matrix4x3f value) Retrieves a matrix4x3 by the specified nameint
getStorageBlock
(CharSequence name) Retrieves the location of a storage block.int
getUniform
(CharSequence name) Retrieves the location of a uniform.int
getUniformBlock
(CharSequence name) Retrieves the location of a uniform block.void
getVector
(CharSequence name, org.joml.Vector2f... values) Retrieves an array of vectors by the specified name.void
getVector
(CharSequence name, org.joml.Vector2i... values) Retrieves an array of vectors by the specified name.void
getVector
(CharSequence name, org.joml.Vector3f... values) Retrieves an array of vectors by the specified name.void
getVector
(CharSequence name, org.joml.Vector3i... values) Retrieves an array of vectors by the specified name.void
getVector
(CharSequence name, org.joml.Vector4f... values) Retrieves an array of vectors by the specified name.void
getVector
(CharSequence name, org.joml.Vector4i... values) Retrieves an array of vectors by the specified name.default boolean
hasStorageBlock
(CharSequence name) Checks if the specified storage block exists in the shader.default boolean
hasUniform
(CharSequence name) Checks if the specified uniform exists in the shader.default boolean
hasUniformBlock
(CharSequence name) Checks if the specified uniform block exists in the shader.
-
Method Details
-
getUniform
Retrieves the location of a uniform.- Parameters:
name
- The name of the uniform to get- Returns:
- The location of that uniform or
-1
if not found
-
hasUniform
Checks if the specified uniform exists in the shader.- Parameters:
name
- The name of the uniform to check- Returns:
- Whether that uniform can be set
-
getUniformBlock
Retrieves the location of a uniform block.- Parameters:
name
- The name of the uniform block to get- Returns:
- The location of that uniform block or -1 if not found
-
hasUniformBlock
Checks if the specified uniform block exists in the shader.- Parameters:
name
- The name of the uniform block to check- Returns:
- Whether that uniform block can be set
-
getStorageBlock
Retrieves the location of a storage block.- Parameters:
name
- The name of the storage block to get- Returns:
- The location of that storage block or -1 if not found
-
hasStorageBlock
Checks if the specified storage block exists in the shader.- Parameters:
name
- The name of the storage block to check- Returns:
- Whether that storage block can be set
-
getFloat
Retrieves a single float by the specified name.- Parameters:
name
- The name of the uniform to get- Returns:
- The float value of that uniform
-
getInt
Retrieves a single integer by the specified name.- Parameters:
name
- The name of the uniform to get- Returns:
- The int value of that uniform
-
getFloats
Retrieves an array of floats by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getInts
Retrieves an array of integers by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getVector
Retrieves an array of vectors by the specified name.- Parameters:
name
- The name of the uniform to getvalues
- The values to set
-
getMatrix
Retrieves a matrix2x2 by the specified name- Parameters:
name
- The name of the uniform to getvalue
- The value to set
-
getMatrix
Retrieves a matrix3x3 by the specified name- Parameters:
name
- The name of the uniform to getvalue
- The value to set
-
getMatrix
Retrieves a matrix3x2 by the specified name- Parameters:
name
- The name of the uniform to getvalue
- The value to set
-
getMatrix
Retrieves a matrix4x4 by the specified name- Parameters:
name
- The name of the uniform to getvalue
- The value to set
-
getMatrix
Retrieves a matrix4x3 by the specified name- Parameters:
name
- The name of the uniform to getvalue
- The value to set
-