Package dev.latvian.mods.klib.gl
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
ConstructorsConstructorDescriptionStaticBuffers(com.mojang.blaze3d.vertex.VertexFormat format, int vertexCount, int indexCount, com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer, @Nullable IndexBuffer indexBuffer) Creates an instance of aStaticBuffersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static StaticBuffersempty(com.mojang.blaze3d.vertex.VertexFormat format) final booleanIndicates whether some other object is "equal to" this one.com.mojang.blaze3d.vertex.VertexFormatformat()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.@Nullable IndexBufferReturns the value of theindexBufferrecord component.intReturns the value of theindexCountrecord component.booleanisEmpty()static StaticBuffersstatic StaticBuffersof(com.mojang.blaze3d.vertex.MeshData meshData, @Nullable Supplier<String> name, @Nullable Optional<IndexBuffer> indexBuffer) voidsetIndexBuffer(com.mojang.blaze3d.systems.RenderPass renderPass, com.mojang.blaze3d.pipeline.RenderPipeline pipeline) final StringtoString()Returns a string representation of this record class.com.mojang.blaze3d.buffers.GpuBufferReturns the value of thevertexBufferrecord component.intReturns the value of thevertexCountrecord component.
-
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 aStaticBuffersrecord class.- Parameters:
format- the value for theformatrecord componentvertexCount- the value for thevertexCountrecord componentindexCount- the value for theindexCountrecord componentvertexBuffer- the value for thevertexBufferrecord componentindexBuffer- the value for theindexBufferrecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isEmpty
public boolean isEmpty() -
empty
-
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
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 '=='. -
format
public com.mojang.blaze3d.vertex.VertexFormat format()Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
vertexCount
public int vertexCount()Returns the value of thevertexCountrecord component.- Returns:
- the value of the
vertexCountrecord component
-
indexCount
public int indexCount()Returns the value of theindexCountrecord component.- Returns:
- the value of the
indexCountrecord component
-
vertexBuffer
public com.mojang.blaze3d.buffers.GpuBuffer vertexBuffer()Returns the value of thevertexBufferrecord component.- Returns:
- the value of the
vertexBufferrecord component
-
indexBuffer
Returns the value of theindexBufferrecord component.- Returns:
- the value of the
indexBufferrecord component
-