Record Class CompiledShader
java.lang.Object
java.lang.Record
foundry.veil.render.shader.compiler.CompiledShader
- Record Components:
id- The OpenGL id of the shader. The shader is automatically deleted lateruniformBindings- The bindings set by the shaderdefinitionDependencies- The shader pre-definitions this shader is dependent on
public record CompiledShader(int id, Map<String,Integer> uniformBindings, Set<String> definitionDependencies)
extends Record
A shader instance that has additional pre-compiled data.
apply(ShaderProgram) should be called after this shader is attached to a program.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ShaderProgram program) Applies the additional attributes of this shader to the specified program.Returns the value of thedefinitionDependenciesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuniformBindingsrecord component.
-
Constructor Details
-
CompiledShader
public CompiledShader(int id, Map<String, Integer> uniformBindings, Set<String> definitionDependencies) Creates an instance of aCompiledShaderrecord class.- Parameters:
id- the value for theidrecord componentuniformBindings- the value for theuniformBindingsrecord componentdefinitionDependencies- the value for thedefinitionDependenciesrecord component
-
-
Method Details
-
apply
Applies the additional attributes of this shader to the specified program. -
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. -
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. -
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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
uniformBindings
Returns the value of theuniformBindingsrecord component.- Returns:
- the value of the
uniformBindingsrecord component
-
definitionDependencies
Returns the value of thedefinitionDependenciesrecord component.- Returns:
- the value of the
definitionDependenciesrecord component
-