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.NativeResourceAllocator virtual tableLayout
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 classBGFXAllocatorVtbl.BufferAn array ofBGFXAllocatorVtblstructs.
-
Constructor Summary
Constructors Constructor Description BGFXAllocatorVtbl(java.nio.ByteBuffer container)Creates aBGFXAllocatorVtblinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BGFXAllocatorVtblcalloc()Returns a newBGFXAllocatorVtblinstance allocated withmemCalloc.static BGFXAllocatorVtbl.Buffercalloc(int capacity)Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withmemCalloc.static BGFXAllocatorVtbl.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorVtbl.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXAllocatorVtblcalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorVtblinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXAllocatorVtblcallocStack()Deprecated.static BGFXAllocatorVtbl.BuffercallocStack(int capacity)Deprecated.static BGFXAllocatorVtbl.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorVtblcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorVtblcreate()Returns a newBGFXAllocatorVtblinstance allocated withBufferUtils.static BGFXAllocatorVtbl.Buffercreate(int capacity)Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withBufferUtils.static BGFXAllocatorVtblcreate(long address)Returns a newBGFXAllocatorVtblinstance for the specified memory address.static BGFXAllocatorVtbl.Buffercreate(long address, int capacity)Create aBGFXAllocatorVtbl.Bufferinstance at the specified memory.static BGFXAllocatorVtblcreateSafe(long address)static BGFXAllocatorVtbl.BuffercreateSafe(long address, int capacity)static BGFXAllocatorVtblmalloc()Returns a newBGFXAllocatorVtblinstance allocated withmemAlloc.static BGFXAllocatorVtbl.Buffermalloc(int capacity)Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withmemAlloc.static BGFXAllocatorVtbl.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorVtbl.Bufferinstance allocated on the specifiedMemoryStack.static BGFXAllocatorVtblmalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorVtblinstance allocated on the specifiedMemoryStack.static BGFXAllocatorVtblmallocStack()Deprecated.static BGFXAllocatorVtbl.BuffermallocStack(int capacity)Deprecated.static BGFXAllocatorVtbl.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorVtblmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXReallocCallbacknrealloc(long struct)Unsafe version ofrealloc().static voidnrealloc(long struct, BGFXReallocCallbackI value)Unsafe version ofrealloc.BGFXReallocCallbackrealloc()the reallocation callbackBGFXAllocatorVtblrealloc(BGFXReallocCallbackI value)Sets the specified value to therealloc()field.BGFXAllocatorVtblset(BGFXAllocatorVtbl src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
BGFXAllocatorVtbl
public BGFXAllocatorVtbl(java.nio.ByteBuffer container)
Creates aBGFXAllocatorVtblinstance 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
-
realloc
public BGFXReallocCallback realloc()
the reallocation callback
-
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 newBGFXAllocatorVtblinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXAllocatorVtbl calloc()
Returns a newBGFXAllocatorVtblinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXAllocatorVtbl create()
Returns a newBGFXAllocatorVtblinstance allocated withBufferUtils.
-
create
public static BGFXAllocatorVtbl create(long address)
Returns a newBGFXAllocatorVtblinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXAllocatorVtbl createSafe(long address)
-
malloc
public static BGFXAllocatorVtbl.Buffer malloc(int capacity)
Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static BGFXAllocatorVtbl.Buffer calloc(int capacity)
Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXAllocatorVtbl.Buffer create(int capacity)
Returns a newBGFXAllocatorVtbl.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static BGFXAllocatorVtbl.Buffer create(long address, int capacity)
Create aBGFXAllocatorVtbl.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static BGFXAllocatorVtbl.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static BGFXAllocatorVtbl mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXAllocatorVtbl callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXAllocatorVtbl mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXAllocatorVtbl callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXAllocatorVtbl.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXAllocatorVtbl.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXAllocatorVtbl.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 BGFXAllocatorVtbl.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static BGFXAllocatorVtbl malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtblinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXAllocatorVtbl calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtblinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static BGFXAllocatorVtbl.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static BGFXAllocatorVtbl.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorVtbl.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-