Interface ShaderUniform

All Superinterfaces:
ShaderUniformAccess
All Known Implementing Classes:
ShaderUniformImpl

public interface ShaderUniform extends ShaderUniformAccess
A single uniform in a shader program.
  • Method Details Link icon

    • invalidateCache Link icon

      void invalidateCache()
      Invalidates the uniform cache.
    • isValid Link icon

      default boolean isValid()
      Specified by:
      isValid in interface ShaderUniformAccess
      Returns:
      Whether this uniform is valid
    • getName Link icon

      String getName()
      Returns:
      The name assigned to this uniform in the shader
    • getLocation Link icon

      int getLocation()
      Returns:
      The location of the uniform in the shader
    • getType Link icon

      Returns:
      The data type of this uniform in the shader
    • getArrayLength Link icon

      int getArrayLength()
      Returns:
      The number of array elements in the uniform
    • getFloat Link icon

      float getFloat()
      Retrieves the value of this uniform as a float.
      Returns:
      The float value of this uniform
    • getFloats Link icon

      default float[] getFloats()
      Retrieves the values of this uniform as a float array.
      Returns:
      A new array with the values of this uniform
    • getFloats Link icon

      default void getFloats(float[] fill)
      Retrieves the values of this uniform as a float array and stores them in the specified array.
      Parameters:
      fill - The array to fill
    • getFloats Link icon

      void getFloats(float[] dst, int offset, int length)
      Retrieves the values of this uniform as a float array and stores them in the specified array.
      Parameters:
      dst - The array to fill
      offset - The position to start filling the array at
      length - The number of values to read
    • getInt Link icon

      int getInt()
      Retrieves the value of this uniform as an integer.
      Returns:
      The int value of this uniform
    • getInts Link icon

      default int[] getInts()
      Retrieves the values of this uniform as an int array.
      Returns:
      A new array with the values of this uniform
    • getInts Link icon

      default void getInts(int[] fill)
      Retrieves the values of this uniform as an int array and stores them in the specified array.
      Parameters:
      fill - The array to fill
    • getInts Link icon

      void getInts(int[] dst, int offset, int length)
      Retrieves the values of this uniform as an int array and stores them in the specified array.
      Parameters:
      dst - The array to fill
      offset - The position to start filling the array at
      length - The number of values to read
    • getDouble Link icon

      double getDouble()
      Retrieves the value of this uniform as a double.
      Returns:
      The int value of this uniform
    • getDoubles Link icon

      default double[] getDoubles()
      Retrieves the values of this uniform as a double array.
      Returns:
      A new array with the values of this uniform
    • getDoubles Link icon

      default void getDoubles(double[] fill)
      Retrieves the values of this uniform as a double array and stores them in the specified array.
      Parameters:
      fill - The array to fill
    • getDoubles Link icon

      void getDoubles(double[] dst, int offset, int length)
      Retrieves the values of this uniform as a double array and stores them in the specified array.
      Parameters:
      dst - The array to fill
      offset - The position to start filling the array at
      length - The number of values to read
    • getLong Link icon

      long getLong()
      Retrieves the value of this uniform as a long.
      Returns:
      The int value of this uniform
    • getLongs Link icon

      default long[] getLongs()
      Retrieves the values of this uniform as a long array.
      Returns:
      A new array with the values of this uniform
    • getLongs Link icon

      default void getLongs(long[] fill)
      Retrieves the values of this uniform as a long array and stores them in the specified array.
      Parameters:
      fill - The array to fill
    • getLongs Link icon

      void getLongs(long[] dst, int offset, int length)
      Retrieves the values of this uniform as a long array and stores them in the specified array.
      Parameters:
      dst - The array to fill
      offset - The position to start filling the array at
      length - The number of values to read
    • getVector Link icon

      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 Link icon

      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 Link icon

      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
    • getVectori Link icon

      void getVectori(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
    • getVectori Link icon

      void getVectori(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
    • getVectori Link icon

      void getVectori(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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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