Interface ShaderUniformAccess
- All Known Subinterfaces:
MutableShaderUniformAccess,ShaderProgram
- All Known Implementing Classes:
ShaderProgramImpl
public interface ShaderUniformAccess
Provides read access to all uniform variables in a shader program.
-
Method Summary
Modifier and TypeMethodDescriptiondefault floatgetFloat(CharSequence name) Retrieves a single float by the specified name.default voidgetFloats(CharSequence name, float[] values) Retrieves an array of floats by the specified name.default intgetInt(CharSequence name) Retrieves a single integer by the specified name.default voidgetInts(CharSequence name, int[] values) Retrieves an array of integers by the specified name.default voidgetMatrix(CharSequence name, org.joml.Matrix2f value) Retrieves a matrix2x2 by the specified namedefault voidgetMatrix(CharSequence name, org.joml.Matrix3f value) Retrieves a matrix3x3 by the specified namedefault voidgetMatrix(CharSequence name, org.joml.Matrix3x2f value) Retrieves a matrix3x2 by the specified namedefault voidgetMatrix(CharSequence name, org.joml.Matrix4f value) Retrieves a matrix4x4 by the specified namedefault voidgetMatrix(CharSequence name, org.joml.Matrix4x3f value) Retrieves a matrix4x3 by the specified nameintintgetUniform(CharSequence name) Retrieves the location of a uniform.intgetUniformBlock(CharSequence name) Retrieves the location of a uniform block.default voidgetVector(CharSequence name, org.joml.Vector2f... values) Retrieves an array of vectors by the specified name.default voidgetVector(CharSequence name, org.joml.Vector2i... values) Retrieves an array of vectors by the specified name.default voidgetVector(CharSequence name, org.joml.Vector3f... values) Retrieves an array of vectors by the specified name.default voidgetVector(CharSequence name, org.joml.Vector3i... values) Retrieves an array of vectors by the specified name.default voidgetVector(CharSequence name, org.joml.Vector4f... values) Retrieves an array of vectors by the specified name.default voidgetVector(CharSequence name, org.joml.Vector4i... values) Retrieves an array of vectors by the specified name.
-
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
-
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
-
getProgram
int getProgram()- Returns:
- The OpenGL id of this program
-
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
-