Package org.lwjgl.bgfx
Class BGFXCallbackVtbl
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<BGFXCallbackVtbl>
org.lwjgl.bgfx.BGFXCallbackVtbl
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXCallbackVtbl
extends org.lwjgl.system.Struct<BGFXCallbackVtbl>
implements org.lwjgl.system.NativeResource
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
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBGFXCallbackVtbl(ByteBuffer container) Creates aBGFXCallbackVtblinstance at the current position of the specifiedByteBuffercontainer. -
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 BGFXCallbackVtblcalloc()Returns a newBGFXCallbackVtblinstance allocated withmemCalloc.static BGFXCallbackVtblcalloc(org.lwjgl.system.MemoryStack stack) Returns a newBGFXCallbackVtblinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXCallbackVtblDeprecated.static BGFXCallbackVtblcallocStack(org.lwjgl.system.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 BGFXCallbackVtblcreate()Returns a newBGFXCallbackVtblinstance allocated withBufferUtils.static BGFXCallbackVtblcreate(long address) Returns a newBGFXCallbackVtblinstance for the specified memory address.static @Nullable BGFXCallbackVtblcreateSafe(long address) @Nullable BGFXFatalCallbackfatal()the fatal error callbackfatal(@Nullable BGFXFatalCallbackI value) Sets the specified value to thefatal()field.static BGFXCallbackVtblmalloc()Returns a newBGFXCallbackVtblinstance allocated withmemAlloc.static BGFXCallbackVtblmalloc(org.lwjgl.system.MemoryStack stack) Returns a newBGFXCallbackVtblinstance allocated on the specifiedMemoryStack.static BGFXCallbackVtblDeprecated.static BGFXCallbackVtblmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static BGFXCacheReadCallbackncache_read(long struct) Unsafe version ofcache_read().static voidncache_read(long struct, BGFXCacheReadCallbackI value) Unsafe version ofcache_read.static BGFXCacheReadSizeCallbackncache_read_size(long struct) Unsafe version ofcache_read_size().static voidncache_read_size(long struct, BGFXCacheReadSizeCallbackI value) Unsafe version ofcache_read_size.static BGFXCacheWriteCallbackncache_write(long struct) Unsafe version ofcache_write().static voidncache_write(long struct, BGFXCacheWriteCallbackI value) Unsafe version ofcache_write.static BGFXCaptureBeginCallbackncapture_begin(long struct) Unsafe version ofcapture_begin().static voidncapture_begin(long struct, BGFXCaptureBeginCallbackI value) Unsafe version ofcapture_begin.static BGFXCaptureEndCallbackncapture_end(long struct) Unsafe version ofcapture_end().static voidncapture_end(long struct, BGFXCaptureEndCallbackI value) Unsafe version ofcapture_end.static BGFXCaptureFrameCallbackncapture_frame(long struct) Unsafe version ofcapture_frame().static voidncapture_frame(long struct, BGFXCaptureFrameCallbackI value) Unsafe version ofcapture_frame.static @Nullable BGFXFatalCallbacknfatal(long struct) Unsafe version offatal().static voidnfatal(long struct, @Nullable BGFXFatalCallbackI value) Unsafe version offatal.static @Nullable BGFXProfilerBeginnprofiler_begin(long struct) Unsafe version ofprofiler_begin().static voidnprofiler_begin(long struct, @Nullable BGFXProfilerBeginI value) Unsafe version ofprofiler_begin.static @Nullable BGFXProfilerBeginLiteralnprofiler_begin_literal(long struct) Unsafe version ofprofiler_begin_literal().static voidnprofiler_begin_literal(long struct, @Nullable BGFXProfilerBeginLiteralI value) Unsafe version ofprofiler_begin_literal.static @Nullable BGFXProfilerEndnprofiler_end(long struct) Unsafe version ofprofiler_end().static voidnprofiler_end(long struct, @Nullable BGFXProfilerEndI value) Unsafe version ofprofiler_end.static BGFXScreenShotCallbacknscreen_shot(long struct) Unsafe version ofscreen_shot().static voidnscreen_shot(long struct, BGFXScreenShotCallbackI value) Unsafe version ofscreen_shot.static @Nullable BGFXTraceVarArgsCallbackntrace_vargs(long struct) Unsafe version oftrace_vargs().static voidntrace_vargs(long struct, @Nullable BGFXTraceVarArgsCallbackI value) Unsafe version oftrace_vargs.@Nullable BGFXProfilerBeginthe profiler begin callbackprofiler_begin(@Nullable BGFXProfilerBeginI value) Sets the specified value to theprofiler_begin()field.@Nullable BGFXProfilerBeginLiteralthe profiler begin literal callbackprofiler_begin_literal(@Nullable BGFXProfilerBeginLiteralI value) Sets the specified value to theprofiler_begin_literal()field.@Nullable BGFXProfilerEndthe profiler end callbackprofiler_end(@Nullable 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.intsizeof()@Nullable BGFXTraceVarArgsCallbackthe debug message callbacktrace_vargs(@Nullable BGFXTraceVarArgsCallbackI value) Sets the specified value to thetrace_vargs()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aBGFXCallbackVtblinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<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 newBGFXCallbackVtblinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newBGFXCallbackVtblinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newBGFXCallbackVtblinstance allocated withBufferUtils. -
create
Returns a newBGFXCallbackVtblinstance 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 newBGFXCallbackVtblinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newBGFXCallbackVtblinstance allocated on the specifiedMemoryStackand 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
-