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 Type
    Method
    Description
    default float
    Retrieves a single float by the specified name.
    default void
    getFloats(CharSequence name, float[] values)
    Retrieves an array of floats by the specified name.
    default int
    Retrieves a single integer by the specified name.
    default void
    getInts(CharSequence name, int[] values)
    Retrieves an array of integers by the specified name.
    default void
    getMatrix(CharSequence name, org.joml.Matrix2f value)
    Retrieves a matrix2x2 by the specified name
    default void
    getMatrix(CharSequence name, org.joml.Matrix3f value)
    Retrieves a matrix3x3 by the specified name
    default void
    getMatrix(CharSequence name, org.joml.Matrix3x2f value)
    Retrieves a matrix3x2 by the specified name
    default void
    getMatrix(CharSequence name, org.joml.Matrix4f value)
    Retrieves a matrix4x4 by the specified name
    default void
    getMatrix(CharSequence name, org.joml.Matrix4x3f value)
    Retrieves a matrix4x3 by the specified name
    int
     
    int
    Retrieves the location of a uniform.
    int
    Retrieves the location of a uniform block.
    default void
    getVector(CharSequence name, org.joml.Vector2f... values)
    Retrieves an array of vectors by the specified name.
    default void
    getVector(CharSequence name, org.joml.Vector2i... values)
    Retrieves an array of vectors by the specified name.
    default void
    getVector(CharSequence name, org.joml.Vector3f... values)
    Retrieves an array of vectors by the specified name.
    default void
    getVector(CharSequence name, org.joml.Vector3i... values)
    Retrieves an array of vectors by the specified name.
    default void
    getVector(CharSequence name, org.joml.Vector4f... values)
    Retrieves an array of vectors by the specified name.
    default void
    getVector(CharSequence name, org.joml.Vector4i... values)
    Retrieves an array of vectors by the specified name.
  • 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
    • 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
    • getProgram

      int getProgram()
      Returns:
      The OpenGL id of this program
    • getFloat

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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

      default 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