Record Class ProgramDefinition
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ProgramDefinition
- Record Components:
vertex- The vertex shader ornullto not include onetesselationControl- The tesselation control shader ornullto not include onetesselationEvaluation- The tesselation evluation shader ornullto not include onegeometry- The geometry shader ornullto not include onefragment- The fragment shader ornullto not include onecompute- The compute shader ornullto not include one. Compute should be in a shader by itselfdefinitions- The definitions to inject when compilingdefinitionDefaults- The default values for definitionstextures- The textures to bind when using this shadershaders- A map of all sources and their OpenGL types for convenience
public record ProgramDefinition(@Nullable ProgramDefinition.ShaderSource vertex, @Nullable ProgramDefinition.ShaderSource tesselationControl, @Nullable ProgramDefinition.ShaderSource tesselationEvaluation, @Nullable ProgramDefinition.ShaderSource geometry, @Nullable ProgramDefinition.ShaderSource fragment, @Nullable ProgramDefinition.ShaderSource compute, String[] definitions, Map<String,String> definitionDefaults, Map<String,ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ProgramDefinition.ShaderSource> shaders)
extends Record
Defines a shader program instance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeserializer forProgramDefinition.static final recordstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionProgramDefinition(@Nullable ProgramDefinition.ShaderSource vertex, @Nullable ProgramDefinition.ShaderSource tesselationControl, @Nullable ProgramDefinition.ShaderSource tesselationEvaluation, @Nullable ProgramDefinition.ShaderSource geometry, @Nullable ProgramDefinition.ShaderSource fragment, @Nullable ProgramDefinition.ShaderSource compute, String[] definitions, Map<String, String> definitionDefaults, Map<String, ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ProgramDefinition.ShaderSource> shaders) Creates an instance of aProgramDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ProgramDefinition.ShaderSourcecompute()Returns the value of thecomputerecord component.Returns the value of thedefinitionDefaultsrecord component.String[]Returns the value of thedefinitionsrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable ProgramDefinition.ShaderSourcefragment()Returns the value of thefragmentrecord component.@Nullable ProgramDefinition.ShaderSourcegeometry()Returns the value of thegeometryrecord component.final inthashCode()Returns a hash code value for this object.it.unimi.dsi.fastutil.ints.Int2ObjectMap<ProgramDefinition.ShaderSource> shaders()Returns the value of theshadersrecord component.@Nullable ProgramDefinition.ShaderSourceReturns the value of thetesselationControlrecord component.@Nullable ProgramDefinition.ShaderSourceReturns the value of thetesselationEvaluationrecord component.textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.@Nullable ProgramDefinition.ShaderSourcevertex()Returns the value of thevertexrecord component.
-
Constructor Details
-
ProgramDefinition
public ProgramDefinition(@Nullable @Nullable ProgramDefinition.ShaderSource vertex, @Nullable @Nullable ProgramDefinition.ShaderSource tesselationControl, @Nullable @Nullable ProgramDefinition.ShaderSource tesselationEvaluation, @Nullable @Nullable ProgramDefinition.ShaderSource geometry, @Nullable @Nullable ProgramDefinition.ShaderSource fragment, @Nullable @Nullable ProgramDefinition.ShaderSource compute, String[] definitions, Map<String, String> definitionDefaults, Map<String, ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ProgramDefinition.ShaderSource> shaders) Creates an instance of aProgramDefinitionrecord class.- Parameters:
vertex- the value for thevertexrecord componenttesselationControl- the value for thetesselationControlrecord componenttesselationEvaluation- the value for thetesselationEvaluationrecord componentgeometry- the value for thegeometryrecord componentfragment- the value for thefragmentrecord componentcompute- the value for thecomputerecord componentdefinitions- the value for thedefinitionsrecord componentdefinitionDefaults- the value for thedefinitionDefaultsrecord componenttextures- the value for thetexturesrecord componentshaders- the value for theshadersrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
vertex
Returns the value of thevertexrecord component.- Returns:
- the value of the
vertexrecord component
-
tesselationControl
Returns the value of thetesselationControlrecord component.- Returns:
- the value of the
tesselationControlrecord component
-
tesselationEvaluation
Returns the value of thetesselationEvaluationrecord component.- Returns:
- the value of the
tesselationEvaluationrecord component
-
geometry
Returns the value of thegeometryrecord component.- Returns:
- the value of the
geometryrecord component
-
fragment
Returns the value of thefragmentrecord component.- Returns:
- the value of the
fragmentrecord component
-
compute
Returns the value of thecomputerecord component.- Returns:
- the value of the
computerecord component
-
definitions
Returns the value of thedefinitionsrecord component.- Returns:
- the value of the
definitionsrecord component
-
definitionDefaults
Returns the value of thedefinitionDefaultsrecord component.- Returns:
- the value of the
definitionDefaultsrecord component
-
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
shaders
Returns the value of theshadersrecord component.- Returns:
- the value of the
shadersrecord component
-