Package com.jme3.util
Class LWJGLBufferAllocator
java.lang.Object
com.jme3.util.LWJGLBufferAllocator
- All Implemented Interfaces:
BufferAllocator
- Direct Known Subclasses:
LWJGLBufferAllocator.ConcurrentLWJGLBufferAllocator
The implementation of the
BufferAllocator
which use MemoryUtil
to manage memory.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Threadsafe implementation of theLWJGLBufferAllocator
. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallocate
(int size) Allocate a direct ByteBuffer of the specified size.void
destroyDirectBuffer
(Buffer buffer) De-allocate a direct buffer.
-
Field Details
-
PROPERTY_CONCURRENT_BUFFER_ALLOCATOR
- See Also:
-
-
Constructor Details
-
LWJGLBufferAllocator
public LWJGLBufferAllocator()
-
-
Method Details
-
destroyDirectBuffer
Description copied from interface:BufferAllocator
De-allocate a direct buffer.- Specified by:
destroyDirectBuffer
in interfaceBufferAllocator
- Parameters:
buffer
- the buffer to de-allocate (not null)
-
allocate
Description copied from interface:BufferAllocator
Allocate a direct ByteBuffer of the specified size.- Specified by:
allocate
in interfaceBufferAllocator
- Parameters:
size
- in bytes (≥0)- Returns:
- a new direct buffer
-