Record Class CompiledShader
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.CompiledShader
- Record Components:
sourceFile
- The source file this shader was compiled from ornull
if the shader has no fileid
- The OpenGL id of the shaderuniformBindings
- The bindings set by the shaderdefinitionDependencies
- The shader pre-definitions this shader is dependent onincludes
- All shader imports included in this file
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
public record CompiledShader(@Nullable net.minecraft.resources.ResourceLocation sourceFile, int id, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes)
extends Record
implements org.lwjgl.system.NativeResource
A shader instance that has additional pre-compiled data.
apply(ShaderProgram)
should be called after this shader is attached to a program.-
Constructor Summary
ConstructorDescriptionCompiledShader
(@Nullable net.minecraft.resources.ResourceLocation sourceFile, int id, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aCompiledShader
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(ShaderProgram program) Applies the additional attributes of this shader to the specified program.Returns the value of thedefinitionDependencies
record component.final boolean
Indicates whether some other object is "equal to" this one.void
free()
final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.Set
<net.minecraft.resources.ResourceLocation> includes()
Returns the value of theincludes
record component.@Nullable net.minecraft.resources.ResourceLocation
Returns the value of thesourceFile
record component.final String
toString()
Returns a string representation of this record class.it.unimi.dsi.fastutil.objects.Object2IntMap
<String> Returns the value of theuniformBindings
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
CompiledShader
public CompiledShader(@Nullable @Nullable net.minecraft.resources.ResourceLocation sourceFile, int id, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aCompiledShader
record class.- Parameters:
sourceFile
- the value for thesourceFile
record componentid
- the value for theid
record componentuniformBindings
- the value for theuniformBindings
record componentdefinitionDependencies
- the value for thedefinitionDependencies
record componentincludes
- the value for theincludes
record component
-
-
Method Details
-
apply
Applies the additional attributes of this shader to the specified program. -
free
public void free()- Specified by:
free
in interfaceorg.lwjgl.system.NativeResource
-
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 '=='. -
sourceFile
@Nullable public @Nullable net.minecraft.resources.ResourceLocation sourceFile()Returns the value of thesourceFile
record component.- Returns:
- the value of the
sourceFile
record component
-
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
uniformBindings
Returns the value of theuniformBindings
record component.- Returns:
- the value of the
uniformBindings
record component
-
definitionDependencies
Returns the value of thedefinitionDependencies
record component.- Returns:
- the value of the
definitionDependencies
record component
-
includes
Returns the value of theincludes
record component.- Returns:
- the value of the
includes
record component
-