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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondrawMode()
Returns the value of thedrawMode
record component.Returns the value of thedrawSetup
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinstanceLayout
record component.shader()
Returns the value of theshader
record component.int
Returns the value of thetemplateVertexCount
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Program
public Program(DrawMode drawMode, Supplier<T> shader, Consumer<T> drawSetup, int templateVertexCount, InstanceLayout instanceLayout) Creates an instance of aProgram
record class.- Parameters:
drawMode
- the value for thedrawMode
record componentshader
- the value for theshader
record componentdrawSetup
- the value for thedrawSetup
record componenttemplateVertexCount
- the value for thetemplateVertexCount
record componentinstanceLayout
- the value for theinstanceLayout
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
drawMode
Returns the value of thedrawMode
record component.- Returns:
- the value of the
drawMode
record component
-
shader
-
drawSetup
-
templateVertexCount
public int templateVertexCount()Returns the value of thetemplateVertexCount
record component.- Returns:
- the value of the
templateVertexCount
record component
-
instanceLayout
Returns the value of theinstanceLayout
record component.- Returns:
- the value of the
instanceLayout
record component
-