Top Description Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXCallbackInterface

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

Callback interface to implement application specific behavior.

Cached items are currently used for OpenGL and Direct3D 12 binary shaders.

fatal and trace_vargs callbacks can be called from any thread. Other callbacks are called from the render thread.

Layout


struct bgfx_callback_interface_t {
    bgfx_callback_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
BGFXCallbackInterface(long address, ByteBuffer container)

public
BGFXCallbackInterface(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static BGFXCallbackInterface
calloc()

Returns a new BGFXCallbackInterface instance allocated with memCalloc.

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

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

public static BGFXCallbackInterface
callocStack()

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

Deprecated
Deprecated for removal in 3.4.0.
protected BGFXCallbackInterface
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 BGFXCallbackInterface
create()

Returns a new BGFXCallbackInterface instance allocated with BufferUtils.

public static BGFXCallbackInterface
create(long address)

Returns a new BGFXCallbackInterface instance for the specified memory address.

public static BGFXCallbackInterface
createSafe(long address)

Like create, but returns null if address is NULL.

public static BGFXCallbackInterface
malloc()

Returns a new BGFXCallbackInterface instance allocated with memAlloc.

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

Returns a new BGFXCallbackInterface instance allocated on the specified MemoryStack.

public static BGFXCallbackInterface
mallocStack()

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

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

Unsafe version of vtbl.

public static void
nvtbl(long struct, BGFXCallbackVtbl value)

Unsafe version of vtbl.

public BGFXCallbackInterface

Returns:

this struct
set
(BGFXCallbackInterface
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 BGFXCallbackVtbl
vtbl()

the callback virtual table

public BGFXCallbackInterface
vtbl(BGFXCallbackVtbl value)

Sets the address of the specified BGFXCallbackVtbl 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

BGFXCallbackInterfaceback to summary
protected BGFXCallbackInterface(long address, ByteBuffer container)
BGFXCallbackInterfaceback to summary
public BGFXCallbackInterface(ByteBuffer container)

Creates a BGFXCallbackInterface 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 BGFXCallbackInterface calloc()

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

callocback to summary
public static BGFXCallbackInterface calloc(MemoryStack stack)

Returns a new BGFXCallbackInterface 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 BGFXCallbackInterface callocStack()

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
createback to summary
protected BGFXCallbackInterface 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 BGFXCallbackInterface create()

Returns a new BGFXCallbackInterface instance allocated with BufferUtils.

createback to summary
public static BGFXCallbackInterface create(long address)

Returns a new BGFXCallbackInterface instance for the specified memory address.

createSafeback to summary
public static BGFXCallbackInterface createSafe(long address)

Like create, but returns null if address is NULL.

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

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

mallocback to summary
public static BGFXCallbackInterface malloc(MemoryStack stack)

Returns a new BGFXCallbackInterface instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static BGFXCallbackInterface mallocStack()

Deprecated

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

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

Deprecated

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

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

Unsafe version of vtbl.

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

Unsafe version of vtbl.

setback to summary
public BGFXCallbackInterface set(BGFXCallbackInterface src)

Copies the specified struct data to this struct.

Parameters
src:BGFXCallbackInterface

the source struct

Returns:BGFXCallbackInterface

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 BGFXCallbackVtbl vtbl()

the callback virtual table

Annotations
@NativeType:bgfx_callback_vtbl_t const *
vtblback to summary
public BGFXCallbackInterface vtbl(BGFXCallbackVtbl value)

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