public class BufferBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
BufferBuilder.State |
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
byteBuffer |
private int |
drawMode |
private boolean |
isDrawing |
private static org.apache.logging.log4j.Logger |
LOGGER |
private boolean |
noColor |
private java.nio.FloatBuffer |
rawFloatBuffer |
private java.nio.IntBuffer |
rawIntBuffer |
private java.nio.ShortBuffer |
rawShortBuffer |
private int |
vertexCount |
private VertexFormat |
vertexFormat |
private VertexFormatElement |
vertexFormatElement |
private int |
vertexFormatIndex |
private double |
xOffset |
private double |
yOffset |
private double |
zOffset |
Constructor and Description |
---|
BufferBuilder(int bufferSizeIn) |
Modifier and Type | Method and Description |
---|---|
void |
addVertexData(int[] vertexData) |
void |
begin(int glMode,
VertexFormat format) |
BufferBuilder |
color(float red,
float green,
float blue,
float alpha) |
BufferBuilder |
color(int red,
int green,
int blue,
int alpha) |
void |
endVertex() |
void |
finishDrawing() |
private int |
getBufferSize() |
java.nio.ByteBuffer |
getByteBuffer() |
int |
getColorIndex(int vertexIndex) |
private static float |
getDistanceSq(java.nio.FloatBuffer p_181665_0_,
float p_181665_1_,
float p_181665_2_,
float p_181665_3_,
int p_181665_4_,
int p_181665_5_) |
int |
getDrawMode() |
int |
getVertexCount() |
VertexFormat |
getVertexFormat() |
BufferBuilder.State |
getVertexState() |
private void |
growBuffer(int p_181670_1_) |
boolean |
isColorDisabled() |
BufferBuilder |
lightmap(int p_187314_1_,
int p_187314_2_) |
private void |
nextVertexFormatIndex() |
void |
noColor() |
BufferBuilder |
normal(float x,
float y,
float z) |
BufferBuilder |
pos(double x,
double y,
double z) |
void |
putBrightness4(int p_178962_1_,
int p_178962_2_,
int p_178962_3_,
int p_178962_4_) |
void |
putBulkData(java.nio.ByteBuffer buffer) |
private void |
putColor(int argb,
int vertexIndex) |
void |
putColor4(int argb) |
void |
putColorMultiplier(float red,
float green,
float blue,
int vertexIndex) |
void |
putColorRGB_F(float red,
float green,
float blue,
int vertexIndex) |
void |
putColorRGB_F4(float red,
float green,
float blue) |
void |
putColorRGBA(int index,
int red,
int green,
int blue) |
void |
putColorRGBA(int index,
int red,
int green,
int blue,
int alpha) |
void |
putNormal(float x,
float y,
float z) |
void |
putPosition(double x,
double y,
double z) |
void |
reset() |
void |
setTranslation(double x,
double y,
double z) |
void |
setVertexState(BufferBuilder.State state) |
void |
sortVertexData(float p_181674_1_,
float p_181674_2_,
float p_181674_3_) |
BufferBuilder |
tex(double u,
double v) |
private static final org.apache.logging.log4j.Logger LOGGER
private java.nio.ByteBuffer byteBuffer
private java.nio.IntBuffer rawIntBuffer
private java.nio.ShortBuffer rawShortBuffer
private java.nio.FloatBuffer rawFloatBuffer
private int vertexCount
private VertexFormatElement vertexFormatElement
private int vertexFormatIndex
private boolean noColor
private int drawMode
private double xOffset
private double yOffset
private double zOffset
private VertexFormat vertexFormat
private boolean isDrawing
private void growBuffer(int p_181670_1_)
public void sortVertexData(float p_181674_1_, float p_181674_2_, float p_181674_3_)
public BufferBuilder.State getVertexState()
private int getBufferSize()
private static float getDistanceSq(java.nio.FloatBuffer p_181665_0_, float p_181665_1_, float p_181665_2_, float p_181665_3_, int p_181665_4_, int p_181665_5_)
public void setVertexState(BufferBuilder.State state)
public void reset()
public void begin(int glMode, VertexFormat format)
public BufferBuilder tex(double u, double v)
public BufferBuilder lightmap(int p_187314_1_, int p_187314_2_)
public void putBrightness4(int p_178962_1_, int p_178962_2_, int p_178962_3_, int p_178962_4_)
public void putPosition(double x, double y, double z)
public int getColorIndex(int vertexIndex)
public void putColorMultiplier(float red, float green, float blue, int vertexIndex)
private void putColor(int argb, int vertexIndex)
public void putColorRGB_F(float red, float green, float blue, int vertexIndex)
public void putColorRGBA(int index, int red, int green, int blue)
public void noColor()
public BufferBuilder color(float red, float green, float blue, float alpha)
public BufferBuilder color(int red, int green, int blue, int alpha)
public void addVertexData(int[] vertexData)
public void endVertex()
public BufferBuilder pos(double x, double y, double z)
public void putNormal(float x, float y, float z)
private void nextVertexFormatIndex()
public BufferBuilder normal(float x, float y, float z)
public void setTranslation(double x, double y, double z)
public void finishDrawing()
public java.nio.ByteBuffer getByteBuffer()
public VertexFormat getVertexFormat()
public int getVertexCount()
public int getDrawMode()
public void putColor4(int argb)
public void putColorRGB_F4(float red, float green, float blue)
public void putColorRGBA(int index, int red, int green, int blue, int alpha)
public boolean isColorDisabled()
public void putBulkData(java.nio.ByteBuffer buffer)