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 TypeMethodDescriptionfloatgetFloat(CharSequence name) Retrieves a single float by the specified name.voidgetFloats(CharSequence name, float[] values) Retrieves an array of floats by the specified name.intgetInt(CharSequence name) Retrieves a single integer by the specified name.voidgetInts(CharSequence name, int[] values) Retrieves an array of integers by the specified name.voidgetMatrix(CharSequence name, org.joml.Matrix2f value) Retrieves a matrix2x2 by the specified namevoidgetMatrix(CharSequence name, org.joml.Matrix3f value) Retrieves a matrix3x3 by the specified namevoidgetMatrix(CharSequence name, org.joml.Matrix3x2f value) Retrieves a matrix3x2 by the specified namevoidgetMatrix(CharSequence name, org.joml.Matrix4f value) Retrieves a matrix4x4 by the specified namevoidgetMatrix(CharSequence name, org.joml.Matrix4x3f value) Retrieves a matrix4x3 by the specified nameintgetStorageBlock(CharSequence name) Retrieves the location of a storage block.intgetUniform(CharSequence name) Retrieves the location of a uniform.intgetUniformBlock(CharSequence name) Retrieves the location of a uniform block.voidgetVector(CharSequence name, org.joml.Vector2f... values) Retrieves an array of vectors by the specified name.voidgetVector(CharSequence name, org.joml.Vector2i... values) Retrieves an array of vectors by the specified name.voidgetVector(CharSequence name, org.joml.Vector3f... values) Retrieves an array of vectors by the specified name.voidgetVector(CharSequence name, org.joml.Vector3i... values) Retrieves an array of vectors by the specified name.voidgetVector(CharSequence name, org.joml.Vector4f... values) Retrieves an array of vectors by the specified name.voidgetVector(CharSequence name, org.joml.Vector4i... values) Retrieves an array of vectors by the specified name.default booleanhasStorageBlock(CharSequence name) Checks if the specified storage block exists in the shader.default booleanhasUniform(CharSequence name) Checks if the specified uniform exists in the shader.default booleanhasUniformBlock(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
-1if 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
-