Record Class StaticBuffers

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.gl.StaticBuffers
All Implemented Interfaces:
AutoCloseable

public record StaticBuffers(com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount, int indexCount, com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer, @Nullable IndexBuffer indexBuffer) extends Record implements AutoCloseable
  • Constructor Summary

    Constructors
    Constructor
    Description
    StaticBuffers(com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount, int indexCount, com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer, @Nullable IndexBuffer indexBuffer)
    Creates an instance of a StaticBuffers record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    empty(com.mojang.blaze3d.vertex.VertexFormat format)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    com.mojang.blaze3d.vertex.VertexFormat
    Returns the value of the format record component.
    final int
    Returns a hash code value for this object.
    @Nullable IndexBuffer
    Returns the value of the indexBuffer record component.
    int
    Returns the value of the indexCount record component.
    boolean
     
    of(com.mojang.blaze3d.vertex.MeshData meshData, @Nullable Supplier<String> name)
     
    of(com.mojang.blaze3d.vertex.MeshData meshData, @Nullable Supplier<String> name, @Nullable Optional<IndexBuffer> indexBuffer)
     
    void
    setIndexBuffer(com.mojang.blaze3d.systems.RenderPass renderPass, com.mojang.blaze3d.pipeline.RenderPipeline pipeline)
     
    final String
    Returns a string representation of this record class.
    com.mojang.blaze3d.buffers.GpuBuffer
    Returns the value of the vertexBuffer record component.
    int
    Returns the value of the vertexCount record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • StaticBuffers

      public StaticBuffers(com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount, int indexCount, com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer, @Nullable @Nullable IndexBuffer indexBuffer)
      Creates an instance of a StaticBuffers record class.
      Parameters:
      format - the value for the format record component
      vertexCount - the value for the vertexCount record component
      indexCount - the value for the indexCount record component
      vertexBuffer - the value for the vertexBuffer record component
      indexBuffer - the value for the indexBuffer record component
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isEmpty

      public boolean isEmpty()
    • empty

      public static StaticBuffers empty(com.mojang.blaze3d.vertex.VertexFormat format)
    • of

      public static StaticBuffers of(com.mojang.blaze3d.vertex.MeshData meshData, @Nullable @Nullable Supplier<String> name, @Nullable @Nullable Optional<IndexBuffer> indexBuffer)
    • of

      public static StaticBuffers of(com.mojang.blaze3d.vertex.MeshData meshData, @Nullable @Nullable Supplier<String> name)
    • setIndexBuffer

      public void setIndexBuffer(com.mojang.blaze3d.systems.RenderPass renderPass, com.mojang.blaze3d.pipeline.RenderPipeline pipeline)
    • 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.
    • format

      public com.mojang.blaze3d.vertex.VertexFormat format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • vertexCount

      public int vertexCount()
      Returns the value of the vertexCount record component.
      Returns:
      the value of the vertexCount record component
    • indexCount

      public int indexCount()
      Returns the value of the indexCount record component.
      Returns:
      the value of the indexCount record component
    • vertexBuffer

      public com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer()
      Returns the value of the vertexBuffer record component.
      Returns:
      the value of the vertexBuffer record component
    • indexBuffer

      @Nullable public @Nullable IndexBuffer indexBuffer()
      Returns the value of the indexBuffer record component.
      Returns:
      the value of the indexBuffer record component