Record Class ProgramDefinition
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ProgramDefinition
- Record Components:
vertex
- The vertex shader ornull
to not include onetesselationControl
- The tesselation control shader ornull
to not include onetesselationEvaluation
- The tesselation evluation shader ornull
to not include onegeometry
- The geometry shader ornull
to not include onefragment
- The fragment shader ornull
to not include onecompute
- The compute shader ornull
to 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
Modifier and TypeClassDescriptionstatic class
Deserializer forProgramDefinition
.static final record
static enum
-
Constructor Summary
ConstructorDescriptionProgramDefinition
(@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 aProgramDefinition
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ProgramDefinition.ShaderSource
compute()
Returns the value of thecompute
record component.Returns the value of thedefinitionDefaults
record component.String[]
Returns the value of thedefinitions
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable ProgramDefinition.ShaderSource
fragment()
Returns the value of thefragment
record component.@Nullable ProgramDefinition.ShaderSource
geometry()
Returns the value of thegeometry
record component.final int
hashCode()
Returns a hash code value for this object.it.unimi.dsi.fastutil.ints.Int2ObjectMap
<ProgramDefinition.ShaderSource> shaders()
Returns the value of theshaders
record component.@Nullable ProgramDefinition.ShaderSource
Returns the value of thetesselationControl
record component.@Nullable ProgramDefinition.ShaderSource
Returns the value of thetesselationEvaluation
record component.textures()
Returns the value of thetextures
record component.final String
toString()
Returns a string representation of this record class.@Nullable ProgramDefinition.ShaderSource
vertex()
Returns the value of thevertex
record 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 aProgramDefinition
record class.- Parameters:
vertex
- the value for thevertex
record componenttesselationControl
- the value for thetesselationControl
record componenttesselationEvaluation
- the value for thetesselationEvaluation
record componentgeometry
- the value for thegeometry
record componentfragment
- the value for thefragment
record componentcompute
- the value for thecompute
record componentdefinitions
- the value for thedefinitions
record componentdefinitionDefaults
- the value for thedefinitionDefaults
record componenttextures
- the value for thetextures
record componentshaders
- the value for theshaders
record 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 thevertex
record component.- Returns:
- the value of the
vertex
record component
-
tesselationControl
Returns the value of thetesselationControl
record component.- Returns:
- the value of the
tesselationControl
record component
-
tesselationEvaluation
Returns the value of thetesselationEvaluation
record component.- Returns:
- the value of the
tesselationEvaluation
record component
-
geometry
Returns the value of thegeometry
record component.- Returns:
- the value of the
geometry
record component
-
fragment
Returns the value of thefragment
record component.- Returns:
- the value of the
fragment
record component
-
compute
Returns the value of thecompute
record component.- Returns:
- the value of the
compute
record component
-
definitions
Returns the value of thedefinitions
record component.- Returns:
- the value of the
definitions
record component
-
definitionDefaults
Returns the value of thedefinitionDefaults
record component.- Returns:
- the value of the
definitionDefaults
record component
-
textures
Returns the value of thetextures
record component.- Returns:
- the value of the
textures
record component
-
shaders
Returns the value of theshaders
record component.- Returns:
- the value of the
shaders
record component
-