public static class BufferFactory.FloatBufferFactory extends BufferFactory
BufferWrapper.FloatBufferWrapper
BufferFactory.ByteBufferFactory, BufferFactory.DoubleBufferFactory, BufferFactory.FloatBufferFactory, BufferFactory.IntBufferFactory, BufferFactory.ShortBufferFactory
Constructor and Description |
---|
FloatBufferFactory()
Constructs a new FloatBufferFactory with the default buffer allocation policy.
|
FloatBufferFactory(boolean allocateDirect)
Constructs a new FloatBufferFactory with the specified buffer allocation policy.
|
Modifier and Type | Method and Description |
---|---|
BufferWrapper |
newBuffer(int size)
Constructs a new FloatBufferWrapper of the specified size, backed by a
FloatBuffer . |
isAllocateDirect
public FloatBufferFactory()
public FloatBufferFactory(boolean allocateDirect)
allocateDirect
- true to allocate and return FloatBufferWrappers backed by direct buffers, false to
allocate and return FloatBufferWrappers backed by non-direct buffers.public BufferWrapper newBuffer(int size)
FloatBuffer
.newBuffer
in class BufferFactory
size
- the new buffer's size, int floats.java.lang.IllegalArgumentException
- if size is negative.