Package org.lwjgl.bgfx
Class BGFXAllocatorVtbl
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXAllocatorVtbl
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXAllocatorVtbl extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Allocator virtual tableMember documentation
realloc
– the reallocation callback
Layout
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); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BGFXAllocatorVtbl.Buffer
An array ofBGFXAllocatorVtbl
structs.
-
Constructor Summary
Constructors Constructor Description BGFXAllocatorVtbl(java.nio.ByteBuffer container)
Creates aBGFXAllocatorVtbl
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BGFXAllocatorVtbl
calloc()
Returns a newBGFXAllocatorVtbl
instance allocated withmemCalloc
.static BGFXAllocatorVtbl.Buffer
calloc(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withmemCalloc
.static BGFXAllocatorVtbl
callocStack()
Returns a newBGFXAllocatorVtbl
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXAllocatorVtbl.Buffer
callocStack(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXAllocatorVtbl.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXAllocatorVtbl
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXAllocatorVtbl
create()
Returns a newBGFXAllocatorVtbl
instance allocated withBufferUtils
.static BGFXAllocatorVtbl.Buffer
create(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withBufferUtils
.static BGFXAllocatorVtbl
create(long address)
Returns a newBGFXAllocatorVtbl
instance for the specified memory address.static BGFXAllocatorVtbl.Buffer
create(long address, int capacity)
Create aBGFXAllocatorVtbl.Buffer
instance at the specified memory.static BGFXAllocatorVtbl
createSafe(long address)
static BGFXAllocatorVtbl.Buffer
createSafe(long address, int capacity)
static BGFXAllocatorVtbl
malloc()
Returns a newBGFXAllocatorVtbl
instance allocated withmemAlloc
.static BGFXAllocatorVtbl.Buffer
malloc(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withmemAlloc
.static BGFXAllocatorVtbl
mallocStack()
Returns a newBGFXAllocatorVtbl
instance allocated on the thread-localMemoryStack
.static BGFXAllocatorVtbl.Buffer
mallocStack(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the thread-localMemoryStack
.static BGFXAllocatorVtbl.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the specifiedMemoryStack
.static BGFXAllocatorVtbl
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl
instance allocated on the specifiedMemoryStack
.static BGFXReallocCallback
nrealloc(long struct)
Unsafe version ofrealloc()
.static void
nrealloc(long struct, BGFXReallocCallbackI value)
Unsafe version ofrealloc
.BGFXReallocCallback
realloc()
Returns the value of therealloc
field.BGFXAllocatorVtbl
realloc(BGFXReallocCallbackI value)
Sets the specified value to therealloc
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 beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
BGFXAllocatorVtbl
public BGFXAllocatorVtbl(java.nio.ByteBuffer container)
Creates aBGFXAllocatorVtbl
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
realloc
public BGFXReallocCallback realloc()
Returns the value of therealloc
field.
-
realloc
public BGFXAllocatorVtbl realloc(BGFXReallocCallbackI value)
Sets the specified value to therealloc
field.
-
set
public BGFXAllocatorVtbl set(BGFXAllocatorVtbl src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXAllocatorVtbl malloc()
Returns a newBGFXAllocatorVtbl
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXAllocatorVtbl calloc()
Returns a newBGFXAllocatorVtbl
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXAllocatorVtbl create()
Returns a newBGFXAllocatorVtbl
instance allocated withBufferUtils
.
-
create
public static BGFXAllocatorVtbl create(long address)
Returns a newBGFXAllocatorVtbl
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXAllocatorVtbl createSafe(long address)
-
malloc
public static BGFXAllocatorVtbl.Buffer malloc(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BGFXAllocatorVtbl.Buffer calloc(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXAllocatorVtbl.Buffer create(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BGFXAllocatorVtbl.Buffer create(long address, int capacity)
Create aBGFXAllocatorVtbl.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BGFXAllocatorVtbl.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BGFXAllocatorVtbl mallocStack()
Returns a newBGFXAllocatorVtbl
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXAllocatorVtbl callocStack()
Returns a newBGFXAllocatorVtbl
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXAllocatorVtbl mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXAllocatorVtbl callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BGFXAllocatorVtbl.Buffer mallocStack(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BGFXAllocatorVtbl.Buffer callocStack(int capacity)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BGFXAllocatorVtbl.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BGFXAllocatorVtbl.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nrealloc
public static BGFXReallocCallback nrealloc(long struct)
Unsafe version ofrealloc()
.
-
nrealloc
public static void nrealloc(long struct, BGFXReallocCallbackI value)
Unsafe version ofrealloc
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-