Top Description Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXAllocatorInterface

extends Struct<BGFXAllocatorInterface>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct bgfx_allocator_interface_t
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Custom 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_t const * vtbl;
}

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
SIZEOF

The struct size in bytes.

public static final int
VTBL

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
BGFXAllocatorInterface(long address, ByteBuffer container)

public
BGFXAllocatorInterface(ByteBuffer container)

Creates a BGFXAllocatorInterface instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static BGFXAllocatorInterface
calloc()

Returns a new BGFXAllocatorInterface instance allocated with memCalloc.

public static BGFXAllocatorInterface
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXAllocatorInterface instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static BGFXAllocatorInterface
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAllocatorInterface
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected BGFXAllocatorInterface
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static BGFXAllocatorInterface
create()

Returns a new BGFXAllocatorInterface instance allocated with BufferUtils.

public static BGFXAllocatorInterface
create(long address)

Returns a new BGFXAllocatorInterface instance for the specified memory address.

public static BGFXAllocatorInterface
createSafe(long address)

Like create, but returns null if address is NULL.

public static BGFXAllocatorInterface
malloc()

Returns a new BGFXAllocatorInterface instance allocated with memAlloc.

public static BGFXAllocatorInterface
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new BGFXAllocatorInterface instance allocated on the specified MemoryStack.

public static BGFXAllocatorInterface
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAllocatorInterface
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static BGFXAllocatorVtbl
nvtbl(long struct)

Unsafe version of vtbl.

public static void
nvtbl(long struct, BGFXAllocatorVtbl value)

Unsafe version of vtbl.

public BGFXAllocatorInterface

Returns:

this struct
set
(BGFXAllocatorInterface
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

public BGFXAllocatorVtbl
vtbl()

the allocator virtual table

public BGFXAllocatorInterface
vtbl(BGFXAllocatorVtbl value)

Sets the address of the specified BGFXAllocatorVtbl to the vtbl field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

VTBLback to summary
public static final int VTBL

The struct member offsets.

Constructor Detail

BGFXAllocatorInterfaceback to summary
protected BGFXAllocatorInterface(long address, ByteBuffer container)
BGFXAllocatorInterfaceback to summary
public BGFXAllocatorInterface(ByteBuffer container)

Creates a BGFXAllocatorInterface 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.

Method Detail

callocback to summary
public static BGFXAllocatorInterface calloc()

Returns a new BGFXAllocatorInterface instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static BGFXAllocatorInterface calloc(MemoryStack stack)

Returns a new BGFXAllocatorInterface instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static BGFXAllocatorInterface callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static BGFXAllocatorInterface callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
createback to summary
protected BGFXAllocatorInterface create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static BGFXAllocatorInterface create()

Returns a new BGFXAllocatorInterface instance allocated with BufferUtils.

createback to summary
public static BGFXAllocatorInterface create(long address)

Returns a new BGFXAllocatorInterface instance for the specified memory address.

createSafeback to summary
public static BGFXAllocatorInterface createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static BGFXAllocatorInterface malloc()

Returns a new BGFXAllocatorInterface instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static BGFXAllocatorInterface malloc(MemoryStack stack)

Returns a new BGFXAllocatorInterface instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static BGFXAllocatorInterface mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static BGFXAllocatorInterface mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
nvtblback to summary
public static BGFXAllocatorVtbl nvtbl(long struct)

Unsafe version of vtbl.

nvtblback to summary
public static void nvtbl(long struct, BGFXAllocatorVtbl value)

Unsafe version of vtbl.

setback to summary
public BGFXAllocatorInterface set(BGFXAllocatorInterface src)

Copies the specified struct data to this struct.

Parameters
src:BGFXAllocatorInterface

the source struct

Returns:BGFXAllocatorInterface

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
validateback to summary
public static void validate(long struct)

Validates pointer members that should not be NULL.

Parameters
struct:long

the struct to validate

vtblback to summary
public BGFXAllocatorVtbl vtbl()

the allocator virtual table

Annotations
@NativeType:bgfx_allocator_vtbl_t const *
vtblback to summary
public BGFXAllocatorInterface vtbl(BGFXAllocatorVtbl value)

Sets the address of the specified BGFXAllocatorVtbl to the vtbl field.