Package org.lwjgl.bgfx
Class BGFXCallbackVtbl
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Callback virtual table.
LWJGL note: The bgfx build bundled with LWJGL will never invoke the fatal
, trace_vargs
, profiler_begin
,
profiler_begin_literal
, profiler_end
callbacks, so they may be NULL
. When using a custom build with BGFX_CONFIG_DEBUG
(Debug
configuration) and/or BGFX_CONFIG_PROFILER
(--with-profiler
build option), the corresponding callbacks should not be
NULL
.
Layout
struct bgfx_callback_vtbl_t {
void (*fatal
) (bgfx_callback_interface_t *_this, char const *_filePath, uint16_t _line, bgfx_fatal_t _code, char const *_str);
void (*trace_vargs
) (bgfx_callback_interface_t *_this, char const *_filePath, uint16_t _line, char const *_format, va_list _argList);
void (*profiler_begin
) (bgfx_callback_interface_t *_this, char const *_name, uint32_t _abgr, char const *_filePath, uint16_t _line);
void (*profiler_begin_literal
) (bgfx_callback_interface_t *_this, char const *_name, uint32_t _abgr, char const *_filePath, uint16_t _line);
void (*profiler_end
) (bgfx_callback_interface_t *_this);
uint32_t (*cache_read_size
) (bgfx_callback_interface_t *_this, uint64_t _id);
bool (*cache_read
) (bgfx_callback_interface_t *_this, uint64_t _id, void *_data, uint32_t _size);
void (*cache_write
) (bgfx_callback_interface_t *_this, uint64_t _id, void const *_data, uint32_t _size);
void (*screen_shot
) (bgfx_callback_interface_t *_this, char const *_filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, void const *_data, uint32_t _size, bool _yflip);
void (*capture_begin
) (bgfx_callback_interface_t *_this, uint32_t _width, uint32_t _height, uint32_t _pitch, bgfx_texture_format_t _format, bool _yflip);
void (*capture_end
) (bgfx_callback_interface_t *_this);
void (*capture_frame
) (bgfx_callback_interface_t *_this, void const *_data, uint32_t _size);
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionBGFXCallbackVtbl
(ByteBuffer container) Creates aBGFXCallbackVtbl
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionthe cache read callbackcache_read
(BGFXCacheReadCallbackI value) Sets the specified value to thecache_read()
field.the cache read size callbackSets the specified value to thecache_read_size()
field.the cache write callbackSets the specified value to thecache_write()
field.static BGFXCallbackVtbl
calloc()
Returns a newBGFXCallbackVtbl
instance allocated withmemCalloc
.static BGFXCallbackVtbl
calloc
(MemoryStack stack) Returns a newBGFXCallbackVtbl
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXCallbackVtbl
Deprecated.static BGFXCallbackVtbl
callocStack
(MemoryStack stack) Deprecated.the capture begin callbackSets the specified value to thecapture_begin()
field.the capture end callbackSets the specified value to thecapture_end()
field.the capture framecallbackSets the specified value to thecapture_frame()
field.static BGFXCallbackVtbl
create()
Returns a newBGFXCallbackVtbl
instance allocated withBufferUtils
.static BGFXCallbackVtbl
create
(long address) Returns a newBGFXCallbackVtbl
instance for the specified memory address.static BGFXCallbackVtbl
createSafe
(long address) fatal()
the fatal error callbackfatal
(BGFXFatalCallbackI value) Sets the specified value to thefatal()
field.static BGFXCallbackVtbl
malloc()
Returns a newBGFXCallbackVtbl
instance allocated withmemAlloc
.static BGFXCallbackVtbl
malloc
(MemoryStack stack) Returns a newBGFXCallbackVtbl
instance allocated on the specifiedMemoryStack
.static BGFXCallbackVtbl
Deprecated.static BGFXCallbackVtbl
mallocStack
(MemoryStack stack) Deprecated.static BGFXCacheReadCallback
ncache_read
(long struct) Unsafe version ofcache_read()
.static void
ncache_read
(long struct, BGFXCacheReadCallbackI value) Unsafe version ofcache_read
.static BGFXCacheReadSizeCallback
ncache_read_size
(long struct) Unsafe version ofcache_read_size()
.static void
ncache_read_size
(long struct, BGFXCacheReadSizeCallbackI value) Unsafe version ofcache_read_size
.static BGFXCacheWriteCallback
ncache_write
(long struct) Unsafe version ofcache_write()
.static void
ncache_write
(long struct, BGFXCacheWriteCallbackI value) Unsafe version ofcache_write
.static BGFXCaptureBeginCallback
ncapture_begin
(long struct) Unsafe version ofcapture_begin()
.static void
ncapture_begin
(long struct, BGFXCaptureBeginCallbackI value) Unsafe version ofcapture_begin
.static BGFXCaptureEndCallback
ncapture_end
(long struct) Unsafe version ofcapture_end()
.static void
ncapture_end
(long struct, BGFXCaptureEndCallbackI value) Unsafe version ofcapture_end
.static BGFXCaptureFrameCallback
ncapture_frame
(long struct) Unsafe version ofcapture_frame()
.static void
ncapture_frame
(long struct, BGFXCaptureFrameCallbackI value) Unsafe version ofcapture_frame
.static BGFXFatalCallback
nfatal
(long struct) Unsafe version offatal()
.static void
nfatal
(long struct, BGFXFatalCallbackI value) Unsafe version offatal
.static BGFXProfilerBegin
nprofiler_begin
(long struct) Unsafe version ofprofiler_begin()
.static void
nprofiler_begin
(long struct, BGFXProfilerBeginI value) Unsafe version ofprofiler_begin
.static BGFXProfilerBeginLiteral
nprofiler_begin_literal
(long struct) Unsafe version ofprofiler_begin_literal()
.static void
nprofiler_begin_literal
(long struct, BGFXProfilerBeginLiteralI value) Unsafe version ofprofiler_begin_literal
.static BGFXProfilerEnd
nprofiler_end
(long struct) Unsafe version ofprofiler_end()
.static void
nprofiler_end
(long struct, BGFXProfilerEndI value) Unsafe version ofprofiler_end
.static BGFXScreenShotCallback
nscreen_shot
(long struct) Unsafe version ofscreen_shot()
.static void
nscreen_shot
(long struct, BGFXScreenShotCallbackI value) Unsafe version ofscreen_shot
.static BGFXTraceVarArgsCallback
ntrace_vargs
(long struct) Unsafe version oftrace_vargs()
.static void
ntrace_vargs
(long struct, BGFXTraceVarArgsCallbackI value) Unsafe version oftrace_vargs
.the profiler begin callbackprofiler_begin
(BGFXProfilerBeginI value) Sets the specified value to theprofiler_begin()
field.the profiler begin literal callbackSets the specified value to theprofiler_begin_literal()
field.the profiler end callbackprofiler_end
(BGFXProfilerEndI value) Sets the specified value to theprofiler_end()
field.the screenshot callbackSets the specified value to thescreen_shot()
field.set
(BGFXCallbackVtbl src) Copies the specified struct data to this struct.set
(BGFXFatalCallbackI fatal, BGFXTraceVarArgsCallbackI trace_vargs, BGFXProfilerBeginI profiler_begin, BGFXProfilerBeginLiteralI profiler_begin_literal, BGFXProfilerEndI profiler_end, BGFXCacheReadSizeCallbackI cache_read_size, BGFXCacheReadCallbackI cache_read, BGFXCacheWriteCallbackI cache_write, BGFXScreenShotCallbackI screen_shot, BGFXCaptureBeginCallbackI capture_begin, BGFXCaptureEndCallbackI capture_end, BGFXCaptureFrameCallbackI capture_frame) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.the debug message callbackSets the specified value to thetrace_vargs()
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
FATAL
public static final int FATALThe struct member offsets. -
TRACE_VARGS
public static final int TRACE_VARGSThe struct member offsets. -
PROFILER_BEGIN
public static final int PROFILER_BEGINThe struct member offsets. -
PROFILER_BEGIN_LITERAL
public static final int PROFILER_BEGIN_LITERALThe struct member offsets. -
PROFILER_END
public static final int PROFILER_ENDThe struct member offsets. -
CACHE_READ_SIZE
public static final int CACHE_READ_SIZEThe struct member offsets. -
CACHE_READ
public static final int CACHE_READThe struct member offsets. -
CACHE_WRITE
public static final int CACHE_WRITEThe struct member offsets. -
SCREEN_SHOT
public static final int SCREEN_SHOTThe struct member offsets. -
CAPTURE_BEGIN
public static final int CAPTURE_BEGINThe struct member offsets. -
CAPTURE_END
public static final int CAPTURE_ENDThe struct member offsets. -
CAPTURE_FRAME
public static final int CAPTURE_FRAMEThe struct member offsets.
-
-
Constructor Details
-
BGFXCallbackVtbl
Creates aBGFXCallbackVtbl
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<BGFXCallbackVtbl>
-
fatal
the fatal error callback -
trace_vargs
the debug message callback -
profiler_begin
the profiler begin callback -
profiler_begin_literal
the profiler begin literal callback -
profiler_end
the profiler end callback -
cache_read_size
the cache read size callback -
cache_read
the cache read callback -
cache_write
the cache write callback -
screen_shot
the screenshot callback -
capture_begin
the capture begin callback -
capture_end
the capture end callback -
capture_frame
the capture framecallback -
fatal
Sets the specified value to thefatal()
field. -
trace_vargs
Sets the specified value to thetrace_vargs()
field. -
profiler_begin
Sets the specified value to theprofiler_begin()
field. -
profiler_begin_literal
Sets the specified value to theprofiler_begin_literal()
field. -
profiler_end
Sets the specified value to theprofiler_end()
field. -
cache_read_size
Sets the specified value to thecache_read_size()
field. -
cache_read
Sets the specified value to thecache_read()
field. -
cache_write
Sets the specified value to thecache_write()
field. -
screen_shot
Sets the specified value to thescreen_shot()
field. -
capture_begin
Sets the specified value to thecapture_begin()
field. -
capture_end
Sets the specified value to thecapture_end()
field. -
capture_frame
Sets the specified value to thecapture_frame()
field. -
set
public BGFXCallbackVtbl set(BGFXFatalCallbackI fatal, BGFXTraceVarArgsCallbackI trace_vargs, BGFXProfilerBeginI profiler_begin, BGFXProfilerBeginLiteralI profiler_begin_literal, BGFXProfilerEndI profiler_end, BGFXCacheReadSizeCallbackI cache_read_size, BGFXCacheReadCallbackI cache_read, BGFXCacheWriteCallbackI cache_write, BGFXScreenShotCallbackI screen_shot, BGFXCaptureBeginCallbackI capture_begin, BGFXCaptureEndCallbackI capture_end, BGFXCaptureFrameCallbackI capture_frame) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newBGFXCallbackVtbl
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXCallbackVtbl
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXCallbackVtbl
instance allocated withBufferUtils
. -
create
Returns a newBGFXCallbackVtbl
instance for the specified memory address. -
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
malloc
Returns a newBGFXCallbackVtbl
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXCallbackVtbl
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nfatal
Unsafe version offatal()
. -
ntrace_vargs
Unsafe version oftrace_vargs()
. -
nprofiler_begin
Unsafe version ofprofiler_begin()
. -
nprofiler_begin_literal
Unsafe version ofprofiler_begin_literal()
. -
nprofiler_end
Unsafe version ofprofiler_end()
. -
ncache_read_size
Unsafe version ofcache_read_size()
. -
ncache_read
Unsafe version ofcache_read()
. -
ncache_write
Unsafe version ofcache_write()
. -
nscreen_shot
Unsafe version ofscreen_shot()
. -
ncapture_begin
Unsafe version ofcapture_begin()
. -
ncapture_end
Unsafe version ofcapture_end()
. -
ncapture_frame
Unsafe version ofcapture_frame()
. -
nfatal
Unsafe version offatal
. -
ntrace_vargs
Unsafe version oftrace_vargs
. -
nprofiler_begin
Unsafe version ofprofiler_begin
. -
nprofiler_begin_literal
Unsafe version ofprofiler_begin_literal
. -
nprofiler_end
Unsafe version ofprofiler_end
. -
ncache_read_size
Unsafe version ofcache_read_size
. -
ncache_read
Unsafe version ofcache_read
. -
ncache_write
Unsafe version ofcache_write
. -
nscreen_shot
Unsafe version ofscreen_shot
. -
ncapture_begin
Unsafe version ofcapture_begin
. -
ncapture_end
Unsafe version ofcapture_end
. -
ncapture_frame
Unsafe version ofcapture_frame
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-