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 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 a CompiledProgram record class.
      Parameters:
      program - the value for the program record component
      shaders - the value for the shaders record component
      shadersView - the value for the shadersView record component
      uniforms - the value for the uniforms record component
      definitionDependencies - the value for the definitionDependencies record component
  • Method Details

    • create

      public static ShaderProgramImpl.CompiledProgram create(net.minecraft.resources.ResourceLocation id)
    • attachShader

      public void attachShader(int glType, CompiledShader shader)
    • detectVertexFormat

      @Nullable public @Nullable com.mojang.blaze3d.vertex.VertexFormat detectVertexFormat()
    • link

      public void link(ShaderProgram shaderProgram) throws ShaderException
      Throws:
      ShaderException
    • free

      public void free()
      Specified by:
      free in interface org.lwjgl.system.NativeResource
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • program

      public int program()
      Returns the value of the program record component.
      Returns:
      the value of the program record component
    • shaders

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shaders()
      Returns the value of the shaders record component.
      Returns:
      the value of the shaders record component
    • shadersView

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<CompiledShader> shadersView()
      Returns the value of the shadersView record component.
      Returns:
      the value of the shadersView record component
    • uniforms

      public ShaderUniformCache uniforms()
      Returns the value of the uniforms record component.
      Returns:
      the value of the uniforms record component
    • definitionDependencies

      public Set<String> definitionDependencies()
      Returns the value of the definitionDependencies record component.
      Returns:
      the value of the definitionDependencies record component