Class DirectVertexConsumer

java.lang.Object
com.jozufozu.flywheel.backend.model.DirectVertexConsumer
All Implemented Interfaces:
com.mojang.blaze3d.vertex.VertexConsumer, net.minecraftforge.client.extensions.IForgeVertexConsumer

public class DirectVertexConsumer extends Object implements com.mojang.blaze3d.vertex.VertexConsumer
An unsafe vertex consumer allowing for unchecked writes into a ByteBuffer.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final com.mojang.blaze3d.vertex.VertexFormat
     
    final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DirectVertexConsumer(ByteBuffer buffer, com.mojang.blaze3d.vertex.VertexFormat format, int maxVertices)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.blaze3d.vertex.VertexConsumer
    color(int r, int g, int b, int a)
     
    void
    defaultColor(int r, int g, int b, int a)
     
    void
     
    boolean
     
    void
     
    com.mojang.blaze3d.vertex.VertexConsumer
    normal(float x, float y, float z)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    overlayCoords(int u, int v)
     
    split(int vertexCount)
    Split off the head of this consumer into a new object and advance this object's write-pointer.
    void
     
    com.mojang.blaze3d.vertex.VertexConsumer
    uv(float u, float v)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    uv2(int u, int v)
     
    com.mojang.blaze3d.vertex.VertexConsumer
    vertex(double x, double y, double z)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.client.extensions.IForgeVertexConsumer

    applyBakedLighting, applyBakedNormals, misc, putBulkData

    Methods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer

    color, color, normal, overlayCoords, putBulkData, putBulkData, putBulkData, uv2, vertex, vertex
  • Field Details

    • format

      public final com.mojang.blaze3d.vertex.VertexFormat format
    • startPos

      public final int startPos
  • Constructor Details

    • DirectVertexConsumer

      public DirectVertexConsumer(ByteBuffer buffer, com.mojang.blaze3d.vertex.VertexFormat format, int maxVertices)
  • Method Details

    • memSetZero

      public void memSetZero()
    • hasOverlay

      public boolean hasOverlay()
    • split

      public DirectVertexConsumer split(int vertexCount)
      Split off the head of this consumer into a new object and advance this object's write-pointer.
      Parameters:
      vertexCount - The number of vertices that must be written to the head.
      Returns:
      The head of this consumer.
    • vertex

      public com.mojang.blaze3d.vertex.VertexConsumer vertex(double x, double y, double z)
      Specified by:
      vertex in interface com.mojang.blaze3d.vertex.VertexConsumer
    • color

      public com.mojang.blaze3d.vertex.VertexConsumer color(int r, int g, int b, int a)
      Specified by:
      color in interface com.mojang.blaze3d.vertex.VertexConsumer
    • uv

      public com.mojang.blaze3d.vertex.VertexConsumer uv(float u, float v)
      Specified by:
      uv in interface com.mojang.blaze3d.vertex.VertexConsumer
    • overlayCoords

      public com.mojang.blaze3d.vertex.VertexConsumer overlayCoords(int u, int v)
      Specified by:
      overlayCoords in interface com.mojang.blaze3d.vertex.VertexConsumer
    • uv2

      public com.mojang.blaze3d.vertex.VertexConsumer uv2(int u, int v)
      Specified by:
      uv2 in interface com.mojang.blaze3d.vertex.VertexConsumer
    • normal

      public com.mojang.blaze3d.vertex.VertexConsumer normal(float x, float y, float z)
      Specified by:
      normal in interface com.mojang.blaze3d.vertex.VertexConsumer
    • endVertex

      public void endVertex()
      Specified by:
      endVertex in interface com.mojang.blaze3d.vertex.VertexConsumer
    • defaultColor

      public void defaultColor(int r, int g, int b, int a)
      Specified by:
      defaultColor in interface com.mojang.blaze3d.vertex.VertexConsumer
    • unsetDefaultColor

      public void unsetDefaultColor()
      Specified by:
      unsetDefaultColor in interface com.mojang.blaze3d.vertex.VertexConsumer