Package org.lwjgl.bgfx
Class BGFXAllocatorInterface
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXAllocatorInterface
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXAllocatorInterface extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceCustom allocator. When custom allocator is not specified, library uses default CRT allocator. The library assumes custom allocator is thread safe.Layout
struct bgfx_allocator_interface_t {bgfx_allocator_vtbl_tconst *vtbl(); }
-
-
Constructor Summary
Constructors Constructor Description BGFXAllocatorInterface(java.nio.ByteBuffer container)Creates aBGFXAllocatorInterfaceinstance 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 BGFXAllocatorInterfacecalloc()Returns a newBGFXAllocatorInterfaceinstance allocated withmemCalloc.static BGFXAllocatorInterfacecalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorInterfaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXAllocatorInterfacecallocStack()Deprecated.static BGFXAllocatorInterfacecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorInterfacecreate()Returns a newBGFXAllocatorInterfaceinstance allocated withBufferUtils.static BGFXAllocatorInterfacecreate(long address)Returns a newBGFXAllocatorInterfaceinstance for the specified memory address.static BGFXAllocatorInterfacecreateSafe(long address)static BGFXAllocatorInterfacemalloc()Returns a newBGFXAllocatorInterfaceinstance allocated withmemAlloc.static BGFXAllocatorInterfacemalloc(org.lwjgl.system.MemoryStack stack)Returns a newBGFXAllocatorInterfaceinstance allocated on the specifiedMemoryStack.static BGFXAllocatorInterfacemallocStack()Deprecated.static BGFXAllocatorInterfacemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorVtblnvtbl(long struct)Unsafe version ofvtbl().static voidnvtbl(long struct, BGFXAllocatorVtbl value)Unsafe version ofvtbl.BGFXAllocatorInterfaceset(BGFXAllocatorInterface src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.BGFXAllocatorVtblvtbl()the allocator virtual tableBGFXAllocatorInterfacevtbl(BGFXAllocatorVtbl value)Sets the address of the specifiedBGFXAllocatorVtblto thevtbl()field.
-
-
-
Constructor Detail
-
BGFXAllocatorInterface
public BGFXAllocatorInterface(java.nio.ByteBuffer container)
Creates aBGFXAllocatorInterfaceinstance 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
-
vtbl
public BGFXAllocatorVtbl vtbl()
the allocator virtual table
-
vtbl
public BGFXAllocatorInterface vtbl(BGFXAllocatorVtbl value)
Sets the address of the specifiedBGFXAllocatorVtblto thevtbl()field.
-
set
public BGFXAllocatorInterface set(BGFXAllocatorInterface src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static BGFXAllocatorInterface malloc()
Returns a newBGFXAllocatorInterfaceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXAllocatorInterface calloc()
Returns a newBGFXAllocatorInterfaceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXAllocatorInterface create()
Returns a newBGFXAllocatorInterfaceinstance allocated withBufferUtils.
-
create
public static BGFXAllocatorInterface create(long address)
Returns a newBGFXAllocatorInterfaceinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXAllocatorInterface createSafe(long address)
-
mallocStack
@Deprecated public static BGFXAllocatorInterface mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXAllocatorInterface callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXAllocatorInterface mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXAllocatorInterface callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
malloc
public static BGFXAllocatorInterface malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorInterfaceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXAllocatorInterface calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXAllocatorInterfaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
nvtbl
public static BGFXAllocatorVtbl nvtbl(long struct)
Unsafe version ofvtbl().
-
nvtbl
public static void nvtbl(long struct, BGFXAllocatorVtbl value)Unsafe version ofvtbl.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-