Class VertexFormat

java.lang.Object
com.mojang.blaze3d.vertex.VertexFormat

@Environment(CLIENT) public class VertexFormat extends Object
Mappings:
Namespace Name
named com/mojang/blaze3d/vertex/VertexFormat
intermediary com/mojang/blaze3d/vertex/VertexFormat
official com/mojang/blaze3d/vertex/VertexFormat
  • Field Details

    • UNKNOWN_ELEMENT

      public static final int UNKNOWN_ELEMENT
      See Also:
    • USE_STAGING_BUFFER_WORKAROUND

      private static final boolean USE_STAGING_BUFFER_WORKAROUND
    • UPLOAD_STAGING_BUFFER

      @Nullable private static @Nullable GpuBuffer UPLOAD_STAGING_BUFFER
    • elements

      private final List<VertexFormatElement> elements
    • names

      private final List<String> names
    • vertexSize

      private final int vertexSize
    • elementsMask

      private final int elementsMask
    • offsetsByElement

      private final int[] offsetsByElement
    • immediateDrawVertexBuffer

      @Nullable private @Nullable GpuBuffer immediateDrawVertexBuffer
    • immediateDrawIndexBuffer

      @Nullable private @Nullable GpuBuffer immediateDrawIndexBuffer
  • Constructor Details

    • VertexFormat

      VertexFormat(List<VertexFormatElement> elements, List<String> names, IntList offsets, int vertexSize)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lcom/mojang/blaze3d/vertex/VertexFormat;<init>(Ljava/util/List;Ljava/util/List;Lit/unimi/dsi/fastutil/ints/IntList;I)V
      intermediary <init> Lcom/mojang/blaze3d/vertex/VertexFormat;<init>(Ljava/util/List;Ljava/util/List;Lit/unimi/dsi/fastutil/ints/IntList;I)V
      official <init> Lcom/mojang/blaze3d/vertex/VertexFormat;<init>(Ljava/util/List;Ljava/util/List;Lit/unimi/dsi/fastutil/ints/IntList;I)V
  • Method Details

    • builder

      public static VertexFormat.Builder builder()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getVertexSize

      public int getVertexSize()
    • getElements

      public List<VertexFormatElement> getElements()
    • getElementAttributeNames

      public List<String> getElementAttributeNames()
    • getOffsetsByElement

      public int[] getOffsetsByElement()
    • getOffset

      public int getOffset(VertexFormatElement element)
      Mappings:
      Namespace Name Mixin selector
      named getOffset Lcom/mojang/blaze3d/vertex/VertexFormat;getOffset(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)I
      intermediary getOffset Lcom/mojang/blaze3d/vertex/VertexFormat;getOffset(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)I
      official getOffset Lcom/mojang/blaze3d/vertex/VertexFormat;getOffset(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)I
    • contains

      public boolean contains(VertexFormatElement element)
      Mappings:
      Namespace Name Mixin selector
      named contains Lcom/mojang/blaze3d/vertex/VertexFormat;contains(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Z
      intermediary contains Lcom/mojang/blaze3d/vertex/VertexFormat;contains(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Z
      official contains Lcom/mojang/blaze3d/vertex/VertexFormat;contains(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Z
    • getElementsMask

      public int getElementsMask()
    • getElementName

      public String getElementName(VertexFormatElement element)
      Mappings:
      Namespace Name Mixin selector
      named getElementName Lcom/mojang/blaze3d/vertex/VertexFormat;getElementName(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Ljava/lang/String;
      intermediary getElementName Lcom/mojang/blaze3d/vertex/VertexFormat;getElementName(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Ljava/lang/String;
      official getElementName Lcom/mojang/blaze3d/vertex/VertexFormat;getElementName(Lcom/mojang/blaze3d/vertex/VertexFormatElement;)Ljava/lang/String;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lcom/mojang/blaze3d/vertex/VertexFormat;equals(Ljava/lang/Object;)Z
      intermediary equals Lcom/mojang/blaze3d/vertex/VertexFormat;equals(Ljava/lang/Object;)Z
      official equals Lcom/mojang/blaze3d/vertex/VertexFormat;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • uploadToBuffer

      private static GpuBuffer uploadToBuffer(@Nullable @Nullable GpuBuffer gpuBuffer, ByteBuffer byteBuffer, int int2, Supplier<String> supplier)
    • uploadToBufferWithWorkaround

      private GpuBuffer uploadToBufferWithWorkaround(@Nullable @Nullable GpuBuffer gpuBuffer, ByteBuffer byteBuffer, int int2, Supplier<String> supplier)
    • uploadImmediateVertexBuffer

      public GpuBuffer uploadImmediateVertexBuffer(ByteBuffer byteBuffer)
    • uploadImmediateIndexBuffer

      public GpuBuffer uploadImmediateIndexBuffer(ByteBuffer byteBuffer)