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 Details

    • getUniform

      int getUniform(CharSequence name)
      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

      default boolean hasUniform(CharSequence name)
      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

      int getUniformBlock(CharSequence name)
      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

      default boolean hasUniformBlock(CharSequence name)
      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

      int getStorageBlock(CharSequence name)
      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

      default boolean hasStorageBlock(CharSequence name)
      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

      float getFloat(CharSequence name)
      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

      int getInt(CharSequence name)
      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

      void getFloats(CharSequence name, float[] values)
      Retrieves an array of floats by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector2f... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector3f... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector4f... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getInts

      void getInts(CharSequence name, int[] values)
      Retrieves an array of integers by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector2i... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector3i... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      void getVector(CharSequence name, org.joml.Vector4i... values)
      Retrieves an array of vectors by the specified name.
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getMatrix

      void getMatrix(CharSequence name, org.joml.Matrix2f value)
      Retrieves a matrix2x2 by the specified name
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      void getMatrix(CharSequence name, org.joml.Matrix3f value)
      Retrieves a matrix3x3 by the specified name
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      void getMatrix(CharSequence name, org.joml.Matrix3x2f value)
      Retrieves a matrix3x2 by the specified name
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      void getMatrix(CharSequence name, org.joml.Matrix4f value)
      Retrieves a matrix4x4 by the specified name
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      void getMatrix(CharSequence name, org.joml.Matrix4x3f value)
      Retrieves a matrix4x3 by the specified name
      Parameters:
      name - The name of the uniform to get
      value - The value to set