Record Class ShaderProgramImpl.CompiledProgram
java.lang.Object
java.lang.Record
foundry.veil.impl.client.render.shader.program.ShaderProgramImpl.CompiledProgram
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource
- Enclosing class:
ShaderProgramImpl
public static record ShaderProgramImpl.CompiledProgram(int program, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView, ShaderUniformCache uniformCache, Set<String> definitionDependencies, int activeBuffers)
extends Record
implements org.lwjgl.system.NativeResource
-
Constructor Summary
ConstructorsConstructorDescriptionCompiledProgram(int program, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView, ShaderUniformCache uniformCache, Set<String> definitionDependencies, int activeBuffers) Creates an instance of aCompiledProgramrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveBuffersrecord component.voidattachShader(int glType, CompiledShader shader) create(net.minecraft.resources.ResourceLocation id, int activeBuffers) Returns the value of thedefinitionDependenciesrecord component.@Nullable com.mojang.blaze3d.vertex.VertexFormatfinal booleanIndicates whether some other object is "equal to" this one.voidfree()final inthashCode()Returns a hash code value for this object.voidlink(ShaderProgram shaderProgram) intprogram()Returns the value of theprogramrecord component.it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders()Returns the value of theshadersrecord component.it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> Returns the value of theshadersViewrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuniformCacherecord component.voidvalidate(ShaderProgram shaderProgram) 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
-
CompiledProgram
public CompiledProgram(int program, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView, ShaderUniformCache uniformCache, Set<String> definitionDependencies, int activeBuffers) Creates an instance of aCompiledProgramrecord class.- Parameters:
program- the value for theprogramrecord componentshaders- the value for theshadersrecord componentshadersView- the value for theshadersViewrecord componentuniformCache- the value for theuniformCacherecord componentdefinitionDependencies- the value for thedefinitionDependenciesrecord componentactiveBuffers- the value for theactiveBuffersrecord component
-
-
Method Details
-
create
public static ShaderProgramImpl.CompiledProgram create(net.minecraft.resources.ResourceLocation id, int activeBuffers) -
attachShader
-
detectVertexFormat
@Nullable public @Nullable com.mojang.blaze3d.vertex.VertexFormat detectVertexFormat() -
validate
-
link
- Throws:
ShaderException
-
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 '=='. -
program
public int program()Returns the value of theprogramrecord component.- Returns:
- the value of the
programrecord component
-
shaders
Returns the value of theshadersrecord component.- Returns:
- the value of the
shadersrecord component
-
shadersView
Returns the value of theshadersViewrecord component.- Returns:
- the value of the
shadersViewrecord component
-
uniformCache
Returns the value of theuniformCacherecord component.- Returns:
- the value of the
uniformCacherecord component
-
definitionDependencies
Returns the value of thedefinitionDependenciesrecord component.- Returns:
- the value of the
definitionDependenciesrecord component
-
activeBuffers
public int activeBuffers()Returns the value of theactiveBuffersrecord component.- Returns:
- the value of the
activeBuffersrecord component
-