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 uniforms, Set<String> definitionDependencies)
extends Record
implements org.lwjgl.system.NativeResource
-
Constructor Summary
ConstructorDescriptionCompiledProgram
(int program, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView, ShaderUniformCache uniforms, Set<String> definitionDependencies) Creates an instance of aCompiledProgram
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachShader
(int glType, CompiledShader shader) create
(net.minecraft.resources.ResourceLocation id) Returns the value of thedefinitionDependencies
record component.@Nullable com.mojang.blaze3d.vertex.VertexFormat
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.void
link
(ShaderProgram shaderProgram) int
program()
Returns the value of theprogram
record component.it.unimi.dsi.fastutil.ints.Int2ObjectMap
<CompiledShader> shaders()
Returns the value of theshaders
record component.it.unimi.dsi.fastutil.ints.Int2ObjectMap
<CompiledShader> Returns the value of theshadersView
record component.final String
toString()
Returns a string representation of this record class.uniforms()
Returns the value of theuniforms
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
-
CompiledProgram
public CompiledProgram(int program, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders, it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView, ShaderUniformCache uniforms, Set<String> definitionDependencies) Creates an instance of aCompiledProgram
record class.- Parameters:
program
- the value for theprogram
record componentshaders
- the value for theshaders
record componentshadersView
- the value for theshadersView
record componentuniforms
- the value for theuniforms
record componentdefinitionDependencies
- the value for thedefinitionDependencies
record component
-
-
Method Details
-
create
-
attachShader
-
detectVertexFormat
@Nullable public @Nullable com.mojang.blaze3d.vertex.VertexFormat detectVertexFormat() -
link
- Throws:
ShaderException
-
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 '=='. -
program
public int program()Returns the value of theprogram
record component.- Returns:
- the value of the
program
record component
-
shaders
Returns the value of theshaders
record component.- Returns:
- the value of the
shaders
record component
-
shadersView
Returns the value of theshadersView
record component.- Returns:
- the value of the
shadersView
record component
-
uniforms
Returns the value of theuniforms
record component.- Returns:
- the value of the
uniforms
record component
-
definitionDependencies
Returns the value of thedefinitionDependencies
record component.- Returns:
- the value of the
definitionDependencies
record component
-