public class BGFXAllocatorVtbl
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
realloc – the reallocation callback
struct bgfx_allocator_vtbl_t {
void * (*realloc) (bgfx_allocator_interface_t *_this, void *_ptr, size_t _size, size_t _align, char *_file, uint32_t _line);
}| Modifier and Type | Class and Description |
|---|---|
static class |
BGFXAllocatorVtbl.Buffer
An array of
BGFXAllocatorVtbl structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
REALLOC
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
BGFXAllocatorVtbl(java.nio.ByteBuffer container)
Creates a
BGFXAllocatorVtbl instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static BGFXAllocatorVtbl |
calloc()
Returns a new
BGFXAllocatorVtbl instance allocated with memCalloc. |
static BGFXAllocatorVtbl.Buffer |
calloc(int capacity)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated with memCalloc. |
static BGFXAllocatorVtbl |
callocStack()
Returns a new
BGFXAllocatorVtbl instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXAllocatorVtbl.Buffer |
callocStack(int capacity)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXAllocatorVtbl.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXAllocatorVtbl |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXAllocatorVtbl instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXAllocatorVtbl |
create()
Returns a new
BGFXAllocatorVtbl instance allocated with BufferUtils. |
static BGFXAllocatorVtbl.Buffer |
create(int capacity)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated with BufferUtils. |
static BGFXAllocatorVtbl |
create(long address)
Returns a new
BGFXAllocatorVtbl instance for the specified memory address. |
static BGFXAllocatorVtbl.Buffer |
create(long address,
int capacity)
Create a
BGFXAllocatorVtbl.Buffer instance at the specified memory. |
static BGFXAllocatorVtbl |
createSafe(long address)
|
static BGFXAllocatorVtbl.Buffer |
createSafe(long address,
int capacity)
|
static BGFXAllocatorVtbl |
malloc()
Returns a new
BGFXAllocatorVtbl instance allocated with memAlloc. |
static BGFXAllocatorVtbl.Buffer |
malloc(int capacity)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated with memAlloc. |
static BGFXAllocatorVtbl |
mallocStack()
Returns a new
BGFXAllocatorVtbl instance allocated on the thread-local MemoryStack. |
static BGFXAllocatorVtbl.Buffer |
mallocStack(int capacity)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated on the thread-local MemoryStack. |
static BGFXAllocatorVtbl.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXAllocatorVtbl.Buffer instance allocated on the specified MemoryStack. |
static BGFXAllocatorVtbl |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXAllocatorVtbl instance allocated on the specified MemoryStack. |
static BGFXReallocCallback |
nrealloc(long struct)
Unsafe version of
realloc(). |
static void |
nrealloc(long struct,
BGFXReallocCallbackI value)
Unsafe version of
realloc. |
BGFXReallocCallback |
realloc()
Returns the value of the
realloc field. |
BGFXAllocatorVtbl |
realloc(BGFXReallocCallbackI value)
Sets the specified value to the
realloc field. |
BGFXAllocatorVtbl |
set(BGFXAllocatorVtbl src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int REALLOC
public BGFXAllocatorVtbl(java.nio.ByteBuffer container)
BGFXAllocatorVtbl instance at the current position of the specified ByteBuffer container. 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic BGFXReallocCallback realloc()
realloc field.public BGFXAllocatorVtbl realloc(BGFXReallocCallbackI value)
realloc field.public BGFXAllocatorVtbl set(BGFXAllocatorVtbl src)
src - the source structpublic static BGFXAllocatorVtbl malloc()
BGFXAllocatorVtbl instance allocated with memAlloc. The instance must be explicitly freed.public static BGFXAllocatorVtbl calloc()
BGFXAllocatorVtbl instance allocated with memCalloc. The instance must be explicitly freed.public static BGFXAllocatorVtbl create()
BGFXAllocatorVtbl instance allocated with BufferUtils.public static BGFXAllocatorVtbl create(long address)
BGFXAllocatorVtbl instance for the specified memory address.@Nullable public static BGFXAllocatorVtbl createSafe(long address)
public static BGFXAllocatorVtbl.Buffer malloc(int capacity)
BGFXAllocatorVtbl.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer calloc(int capacity)
BGFXAllocatorVtbl.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer create(int capacity)
BGFXAllocatorVtbl.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer create(long address, int capacity)
BGFXAllocatorVtbl.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static BGFXAllocatorVtbl.Buffer createSafe(long address, int capacity)
public static BGFXAllocatorVtbl mallocStack()
BGFXAllocatorVtbl instance allocated on the thread-local MemoryStack.public static BGFXAllocatorVtbl callocStack()
BGFXAllocatorVtbl instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static BGFXAllocatorVtbl mallocStack(org.lwjgl.system.MemoryStack stack)
BGFXAllocatorVtbl instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static BGFXAllocatorVtbl callocStack(org.lwjgl.system.MemoryStack stack)
BGFXAllocatorVtbl instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static BGFXAllocatorVtbl.Buffer mallocStack(int capacity)
BGFXAllocatorVtbl.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer callocStack(int capacity)
BGFXAllocatorVtbl.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXAllocatorVtbl.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static BGFXAllocatorVtbl.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
BGFXAllocatorVtbl.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static BGFXReallocCallback nrealloc(long struct)
realloc().public static void nrealloc(long struct,
BGFXReallocCallbackI value)
realloc.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.