Record Class CompiledShader
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.compiler.CompiledShader
- Record Components:
sourceFile- The source file this shader was compiled from ornullif 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
ConstructorsConstructorDescriptionCompiledShader(@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 aCompiledShaderrecord class. -
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.voidfree()final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.Set<net.minecraft.resources.ResourceLocation> includes()Returns the value of theincludesrecord component.@Nullable net.minecraft.resources.ResourceLocationReturns the value of thesourceFilerecord component.final StringtoString()Returns a string representation of this record class.it.unimi.dsi.fastutil.objects.Object2IntMap<String> Returns the value of theuniformBindingsrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aCompiledShaderrecord class.- Parameters:
sourceFile- the value for thesourceFilerecord componentid- the value for theidrecord componentuniformBindings- the value for theuniformBindingsrecord componentdefinitionDependencies- the value for thedefinitionDependenciesrecord componentincludes- the value for theincludesrecord component
-
-
Method Details
-
apply
Applies the additional attributes of this shader to the specified program. -
free
public void free()- Specified by:
freein 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 thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-
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
-
includes
Returns the value of theincludesrecord component.- Returns:
- the value of the
includesrecord component
-