Package org.lwjgl.bgfx
Class BGFXCallbackInterface
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXCallbackInterface
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class BGFXCallbackInterface extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Callback interface to implement application specific behavior.Cached items are currently used for OpenGL and Direct3D 12 binary shaders.
fatal
andtrace_vargs
callbacks can be called from any thread. Other callbacks are called from the render thread.Member documentation
vtbl
– the callback virtual table
Layout
struct bgfx_callback_interface_t {
bgfx_callback_vtbl_t
const * vtbl; }
-
-
Constructor Summary
Constructors Constructor Description BGFXCallbackInterface(java.nio.ByteBuffer container)
Creates aBGFXCallbackInterface
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 BGFXCallbackInterface
calloc()
Returns a newBGFXCallbackInterface
instance allocated withmemCalloc
.static BGFXCallbackInterface
callocStack()
Returns a newBGFXCallbackInterface
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BGFXCallbackInterface
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXCallbackInterface
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXCallbackInterface
create()
Returns a newBGFXCallbackInterface
instance allocated withBufferUtils
.static BGFXCallbackInterface
create(long address)
Returns a newBGFXCallbackInterface
instance for the specified memory address.static BGFXCallbackInterface
createSafe(long address)
static BGFXCallbackInterface
malloc()
Returns a newBGFXCallbackInterface
instance allocated withmemAlloc
.static BGFXCallbackInterface
mallocStack()
Returns a newBGFXCallbackInterface
instance allocated on the thread-localMemoryStack
.static BGFXCallbackInterface
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXCallbackInterface
instance allocated on the specifiedMemoryStack
.static BGFXCallbackVtbl
nvtbl(long struct)
Unsafe version ofvtbl()
.static void
nvtbl(long struct, BGFXCallbackVtbl value)
Unsafe version ofvtbl
.BGFXCallbackInterface
set(BGFXCallbackInterface 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.BGFXCallbackVtbl
vtbl()
Returns aBGFXCallbackVtbl
view of the struct pointed to by thevtbl
field.BGFXCallbackInterface
vtbl(BGFXCallbackVtbl value)
Sets the address of the specifiedBGFXCallbackVtbl
to thevtbl
field.
-
-
-
Constructor Detail
-
BGFXCallbackInterface
public BGFXCallbackInterface(java.nio.ByteBuffer container)
Creates aBGFXCallbackInterface
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
-
vtbl
public BGFXCallbackVtbl vtbl()
Returns aBGFXCallbackVtbl
view of the struct pointed to by thevtbl
field.
-
vtbl
public BGFXCallbackInterface vtbl(BGFXCallbackVtbl value)
Sets the address of the specifiedBGFXCallbackVtbl
to thevtbl
field.
-
set
public BGFXCallbackInterface set(BGFXCallbackInterface src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static BGFXCallbackInterface malloc()
Returns a newBGFXCallbackInterface
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BGFXCallbackInterface calloc()
Returns a newBGFXCallbackInterface
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BGFXCallbackInterface create()
Returns a newBGFXCallbackInterface
instance allocated withBufferUtils
.
-
create
public static BGFXCallbackInterface create(long address)
Returns a newBGFXCallbackInterface
instance for the specified memory address.
-
createSafe
@Nullable public static BGFXCallbackInterface createSafe(long address)
-
mallocStack
public static BGFXCallbackInterface mallocStack()
Returns a newBGFXCallbackInterface
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BGFXCallbackInterface callocStack()
Returns a newBGFXCallbackInterface
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BGFXCallbackInterface mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXCallbackInterface
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BGFXCallbackInterface callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXCallbackInterface
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nvtbl
public static BGFXCallbackVtbl nvtbl(long struct)
Unsafe version ofvtbl()
.
-
nvtbl
public static void nvtbl(long struct, BGFXCallbackVtbl value)
Unsafe version ofvtbl
.
-
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
-
-