Record Class Program<T extends ShaderProg>

java.lang.Object
java.lang.Record
dev.pfaff.altargui.shader.Program<T>

public record Program<T extends ShaderProg>(DrawMode drawMode, Supplier<T extends ShaderProg> shader, Consumer<T extends ShaderProg> drawSetup, int templateVertexCount, InstanceLayout instanceLayout) extends Record
  • Constructor Details

    • Program

      public Program(DrawMode drawMode, Supplier<T> shader, Consumer<T> drawSetup, int templateVertexCount, InstanceLayout instanceLayout)
      Creates an instance of a Program record class.
      Parameters:
      drawMode - the value for the drawMode record component
      shader - the value for the shader record component
      drawSetup - the value for the drawSetup record component
      templateVertexCount - the value for the templateVertexCount record component
      instanceLayout - the value for the instanceLayout record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • drawMode

      public DrawMode drawMode()
      Returns the value of the drawMode record component.
      Returns:
      the value of the drawMode record component
    • shader

      public Supplier<T> shader()
      Returns the value of the shader record component.
      Returns:
      the value of the shader record component
    • drawSetup

      public Consumer<T> drawSetup()
      Returns the value of the drawSetup record component.
      Returns:
      the value of the drawSetup record component
    • templateVertexCount

      public int templateVertexCount()
      Returns the value of the templateVertexCount record component.
      Returns:
      the value of the templateVertexCount record component
    • instanceLayout

      public InstanceLayout instanceLayout()
      Returns the value of the instanceLayout record component.
      Returns:
      the value of the instanceLayout record component