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 net.minecraft.resources.ResourceLocation vertex, @Nullable net.minecraft.resources.ResourceLocation tesselationControl, @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation, @Nullable net.minecraft.resources.ResourceLocation geometry, @Nullable net.minecraft.resources.ResourceLocation fragment, @Nullable net.minecraft.resources.ResourceLocation compute, String[] definitions, Map<String,String> definitionDefaults, Map<String,ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders)
extends Record
Defines a shader program instance.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionProgramDefinition
(@Nullable net.minecraft.resources.ResourceLocation vertex, @Nullable net.minecraft.resources.ResourceLocation tesselationControl, @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation, @Nullable net.minecraft.resources.ResourceLocation geometry, @Nullable net.minecraft.resources.ResourceLocation fragment, @Nullable net.minecraft.resources.ResourceLocation compute, String[] definitions, Map<String, String> definitionDefaults, Map<String, ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders) Creates an instance of aProgramDefinition
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.resources.ResourceLocation
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 net.minecraft.resources.ResourceLocation
fragment()
Returns the value of thefragment
record component.@Nullable net.minecraft.resources.ResourceLocation
geometry()
Returns the value of thegeometry
record component.getMacros
(Set<String> dependencies, ShaderPreDefinitions definitions) final int
hashCode()
Returns a hash code value for this object.it.unimi.dsi.fastutil.ints.Int2ObjectMap
<net.minecraft.resources.ResourceLocation> shaders()
Returns the value of theshaders
record component.@Nullable net.minecraft.resources.ResourceLocation
Returns the value of thetesselationControl
record component.@Nullable net.minecraft.resources.ResourceLocation
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 net.minecraft.resources.ResourceLocation
vertex()
Returns the value of thevertex
record component.
-
Constructor Details
-
ProgramDefinition
public ProgramDefinition(@Nullable @Nullable net.minecraft.resources.ResourceLocation vertex, @Nullable @Nullable net.minecraft.resources.ResourceLocation tesselationControl, @Nullable @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation, @Nullable @Nullable net.minecraft.resources.ResourceLocation geometry, @Nullable @Nullable net.minecraft.resources.ResourceLocation fragment, @Nullable @Nullable net.minecraft.resources.ResourceLocation compute, String[] definitions, Map<String, String> definitionDefaults, Map<String, ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> 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
-
getMacros
-
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
@Nullable public @Nullable net.minecraft.resources.ResourceLocation vertex()Returns the value of thevertex
record component.- Returns:
- the value of the
vertex
record component
-
tesselationControl
@Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationControl()Returns the value of thetesselationControl
record component.- Returns:
- the value of the
tesselationControl
record component
-
tesselationEvaluation
@Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation()Returns the value of thetesselationEvaluation
record component.- Returns:
- the value of the
tesselationEvaluation
record component
-
geometry
@Nullable public @Nullable net.minecraft.resources.ResourceLocation geometry()Returns the value of thegeometry
record component.- Returns:
- the value of the
geometry
record component
-
fragment
@Nullable public @Nullable net.minecraft.resources.ResourceLocation fragment()Returns the value of thefragment
record component.- Returns:
- the value of the
fragment
record component
-
compute
@Nullable public @Nullable net.minecraft.resources.ResourceLocation 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
public it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders()Returns the value of theshaders
record component.- Returns:
- the value of the
shaders
record component
-