Package org.lwjgl.nuklear
Class NkBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_buffer {struct nk_buffer_markermarker()[2];struct nk_allocatorpool(); enum nk_allocation_typetype();struct nk_memorymemory(); floatgrow_factor(); nk_sizeallocated(); nk_sizeneeded(); nk_sizecalls(); nk_sizesize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkBuffer.BufferAn array ofNkBufferstructs.
-
Constructor Summary
Constructors Constructor Description NkBuffer(java.nio.ByteBuffer container)Creates aNkBufferinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longallocated()total amount of memory allocatedstatic NkBuffercalloc()Returns a newNkBufferinstance allocated withmemCalloc.static NkBuffer.Buffercalloc(int capacity)Returns a newNkBuffer.Bufferinstance allocated withmemCalloc.static NkBuffer.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkBuffercalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkBuffercallocStack()Deprecated.static NkBuffer.BuffercallocStack(int capacity)Deprecated.static NkBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkBuffercallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcalls()number of allocation callsstatic NkBuffercreate()Returns a newNkBufferinstance allocated withBufferUtils.static NkBuffer.Buffercreate(int capacity)Returns a newNkBuffer.Bufferinstance allocated withBufferUtils.static NkBuffercreate(long address)Returns a newNkBufferinstance for the specified memory address.static NkBuffer.Buffercreate(long address, int capacity)Create aNkBuffer.Bufferinstance at the specified memory.static NkBuffercreateSafe(long address)static NkBuffer.BuffercreateSafe(long address, int capacity)floatgrow_factor()growing factor for dynamic memory managementstatic NkBuffermalloc()Returns a newNkBufferinstance allocated withmemAlloc.static NkBuffer.Buffermalloc(int capacity)Returns a newNkBuffer.Bufferinstance allocated withmemAlloc.static NkBuffer.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkBuffer.Bufferinstance allocated on the specifiedMemoryStack.static NkBuffermalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkBufferinstance allocated on the specifiedMemoryStack.static NkBuffermallocStack()Deprecated.static NkBuffer.BuffermallocStack(int capacity)Deprecated.static NkBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkBuffermallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.NkBufferMarker.Buffermarker()buffer marker to free a buffer to a certain offsetNkBufferMarkermarker(int index)buffer marker to free a buffer to a certain offsetNkMemorymemory()memory and size of the current memory blockstatic longnallocated(long struct)Unsafe version ofallocated().static longncalls(long struct)Unsafe version ofcalls().longneeded()totally consumed memory given that enough memory is presentstatic floatngrow_factor(long struct)Unsafe version ofgrow_factor().static NkBufferMarker.Buffernmarker(long struct)Unsafe version ofmarker().static NkBufferMarkernmarker(long struct, int index)Unsafe version ofmarker.static NkMemorynmemory(long struct)Unsafe version ofmemory().static longnneeded(long struct)Unsafe version ofneeded().static NkAllocatornpool(long struct)Unsafe version ofpool().static longnsize(long struct)Unsafe version ofsize().static intntype(long struct)Unsafe version oftype().NkAllocatorpool()allocator callback for dynamic bufferslongsize()current size of the bufferintsizeof()inttype()memory management type
-
-
-
Constructor Detail
-
NkBuffer
public NkBuffer(java.nio.ByteBuffer container)
Creates aNkBufferinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
marker
public NkBufferMarker.Buffer marker() public NkBufferMarker marker(int index)
buffer marker to free a buffer to a certain offset
-
pool
public NkAllocator pool()
allocator callback for dynamic buffers
-
type
public int type()
memory management type
-
memory
public NkMemory memory()
memory and size of the current memory block
-
grow_factor
public float grow_factor()
growing factor for dynamic memory management
-
allocated
public long allocated()
total amount of memory allocated
-
needed
public long needed()
totally consumed memory given that enough memory is present
-
calls
public long calls()
number of allocation calls
-
size
public long size()
current size of the buffer
-
malloc
public static NkBuffer malloc()
Returns a newNkBufferinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkBuffer calloc()
Returns a newNkBufferinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkBuffer create()
Returns a newNkBufferinstance allocated withBufferUtils.
-
create
public static NkBuffer create(long address)
Returns a newNkBufferinstance for the specified memory address.
-
createSafe
@Nullable public static NkBuffer createSafe(long address)
-
malloc
public static NkBuffer.Buffer malloc(int capacity)
Returns a newNkBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkBuffer.Buffer calloc(int capacity)
Returns a newNkBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkBuffer.Buffer create(int capacity)
Returns a newNkBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkBuffer.Buffer create(long address, int capacity)
Create aNkBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NkBuffer mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkBuffer callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkBuffer.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkBuffer.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkBuffer malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkBuffer calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NkBuffer.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NkBuffer.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmarker
public static NkBufferMarker.Buffer nmarker(long struct)
Unsafe version ofmarker().
-
nmarker
public static NkBufferMarker nmarker(long struct, int index)
Unsafe version ofmarker.
-
npool
public static NkAllocator npool(long struct)
Unsafe version ofpool().
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
ngrow_factor
public static float ngrow_factor(long struct)
Unsafe version ofgrow_factor().
-
nallocated
public static long nallocated(long struct)
Unsafe version ofallocated().
-
nneeded
public static long nneeded(long struct)
Unsafe version ofneeded().
-
ncalls
public static long ncalls(long struct)
Unsafe version ofcalls().
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
-