Package com.mojang.blaze3d.vertex
Class ByteBufferBuilder
java.lang.Object
com.mojang.blaze3d.vertex.ByteBufferBuilder
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.lwjgl.system.MemoryUtil.MemoryAllocator
private static final int
private long
private static final long
private int
private static final org.slf4j.Logger
private static final int
private final long
private static final com.mojang.jtracy.MemoryPool
private long
(package private) long
private int
private long
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferBuilder
(int pCapacity) ByteBufferBuilder
(int pCapacity, long pMaxCapacity) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
private void
void
clear()
void
close()
void
discard()
private void
private void
ensureCapacity
(long pCapacity) static ByteBufferBuilder
exactlySized
(int pSize) (package private) void
(package private) boolean
isValid
(int pGeneration) long
reserve
(int pBytes) private void
resize
(long pNewSize)
-
Field Details
-
MEMORY_POOL
private static final com.mojang.jtracy.MemoryPool MEMORY_POOL -
LOGGER
private static final org.slf4j.Logger LOGGER -
ALLOCATOR
private static final org.lwjgl.system.MemoryUtil.MemoryAllocator ALLOCATOR -
DEFAULT_MAX_CAPACITY
private static final long DEFAULT_MAX_CAPACITY- See Also:
-
MAX_GROWTH_SIZE
private static final int MAX_GROWTH_SIZE- See Also:
-
BUFFER_FREED_GENERATION
private static final int BUFFER_FREED_GENERATION- See Also:
-
pointer
long pointer -
capacity
private long capacity -
maxCapacity
private final long maxCapacity -
writeOffset
private long writeOffset -
nextResultOffset
private long nextResultOffset -
resultCount
private int resultCount -
generation
private int generation
-
-
Constructor Details
-
ByteBufferBuilder
public ByteBufferBuilder(int pCapacity, long pMaxCapacity) -
ByteBufferBuilder
public ByteBufferBuilder(int pCapacity)
-
-
Method Details
-
exactlySized
-
reserve
public long reserve(int pBytes) -
ensureCapacity
private void ensureCapacity(long pCapacity) -
resize
private void resize(long pNewSize) -
build
-
clear
public void clear() -
discard
public void discard() -
isValid
boolean isValid(int pGeneration) -
freeResult
void freeResult() -
discardResults
private void discardResults() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
checkOpen
private void checkOpen()
-