Package com.jme3.util

Class LWJGLBufferAllocator

java.lang.Object
com.jme3.util.LWJGLBufferAllocator
All Implemented Interfaces:
BufferAllocator
Direct Known Subclasses:
LWJGLBufferAllocator.ConcurrentLWJGLBufferAllocator

public class LWJGLBufferAllocator extends Object implements BufferAllocator
The implementation of the BufferAllocator which use MemoryUtil to manage memory.
  • Field Details

    • PROPERTY_CONCURRENT_BUFFER_ALLOCATOR

      public static final String PROPERTY_CONCURRENT_BUFFER_ALLOCATOR
      See Also:
  • Constructor Details

    • LWJGLBufferAllocator

      public LWJGLBufferAllocator()
  • Method Details

    • destroyDirectBuffer

      public void destroyDirectBuffer(Buffer buffer)
      Description copied from interface: BufferAllocator
      De-allocate a direct buffer.
      Specified by:
      destroyDirectBuffer in interface BufferAllocator
      Parameters:
      buffer - the buffer to de-allocate (not null)
    • allocate

      public ByteBuffer allocate(int size)
      Description copied from interface: BufferAllocator
      Allocate a direct ByteBuffer of the specified size.
      Specified by:
      allocate in interface BufferAllocator
      Parameters:
      size - in bytes (≥0)
      Returns:
      a new direct buffer