Package org.lwjgl.bgfx
Class BGFXInit
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Initialization parameters used by
init
.
Layout
struct bgfx_init_t {
bgfx_renderer_type_t type()
;
uint16_t vendorId()
;
uint16_t deviceId()
;
uint64_t capabilities()
;
bool debug()
;
bool profile()
;
bgfx_platform_data_t
platformData()
;
bgfx_resolution_t
resolution()
;
bgfx_init_limits_t
limits()
;
bgfx_callback_interface_t
* callback()
;
bgfx_allocator_interface_t
* allocator()
;
}
-
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 size in bytes.static final int
The struct member offsets.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
ConstructorDescriptionBGFXInit
(ByteBuffer container) Creates aBGFXInit
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptioncustom allocator.allocator
(BGFXAllocatorInterface value) Sets the address of the specifiedBGFXAllocatorInterface
to theallocator()
field.callback()
provide application specific callback interfacecallback
(BGFXCallbackInterface value) Sets the address of the specifiedBGFXCallbackInterface
to thecallback()
field.static BGFXInit
calloc()
Returns a newBGFXInit
instance allocated withmemCalloc
.static BGFXInit
calloc
(MemoryStack stack) Returns a newBGFXInit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BGFXInit
Deprecated.static BGFXInit
callocStack
(MemoryStack stack) Deprecated.long
capabilities initialization mask (default:UINT64_MAX
)capabilities
(long value) Sets the specified value to thecapabilities()
field.static BGFXInit
create()
Returns a newBGFXInit
instance allocated withBufferUtils
.static BGFXInit
create
(long address) Returns a newBGFXInit
instance for the specified memory address.static BGFXInit
createSafe
(long address) boolean
debug()
enable device for debuggingdebug
(boolean value) Sets the specified value to thedebug()
field.short
deviceId()
device ID.deviceId
(short value) Sets the specified value to thedeviceId()
field.limits()
configurable runtime limits parameterslimits
(Consumer<BGFXInitLimits> consumer) limits
(BGFXInitLimits value) Copies the specifiedBGFXInitLimits
to thelimits()
field.static BGFXInit
malloc()
Returns a newBGFXInit
instance allocated withmemAlloc
.static BGFXInit
malloc
(MemoryStack stack) Returns a newBGFXInit
instance allocated on the specifiedMemoryStack
.static BGFXInit
Deprecated.static BGFXInit
mallocStack
(MemoryStack stack) Deprecated.static BGFXAllocatorInterface
nallocator
(long struct) Unsafe version ofallocator()
.static void
nallocator
(long struct, BGFXAllocatorInterface value) Unsafe version ofallocator
.static BGFXCallbackInterface
ncallback
(long struct) Unsafe version ofcallback()
.static void
ncallback
(long struct, BGFXCallbackInterface value) Unsafe version ofcallback
.static long
ncapabilities
(long struct) Unsafe version ofcapabilities()
.static void
ncapabilities
(long struct, long value) Unsafe version ofcapabilities
.static boolean
ndebug
(long struct) Unsafe version ofdebug()
.static void
ndebug
(long struct, boolean value) Unsafe version ofdebug
.static short
ndeviceId
(long struct) Unsafe version ofdeviceId()
.static void
ndeviceId
(long struct, short value) Unsafe version ofdeviceId
.static BGFXInitLimits
nlimits
(long struct) Unsafe version oflimits()
.static void
nlimits
(long struct, BGFXInitLimits value) Unsafe version oflimits
.static BGFXPlatformData
nplatformData
(long struct) Unsafe version ofplatformData()
.static void
nplatformData
(long struct, BGFXPlatformData value) Unsafe version ofplatformData
.static boolean
nprofile
(long struct) Unsafe version ofprofile()
.static void
nprofile
(long struct, boolean value) Unsafe version ofprofile
.static BGFXResolution
nresolution
(long struct) Unsafe version ofresolution()
.static void
nresolution
(long struct, BGFXResolution value) Unsafe version ofresolution
.static int
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, int value) Unsafe version oftype
.static short
nvendorId
(long struct) Unsafe version ofvendorId()
.static void
nvendorId
(long struct, short value) Unsafe version ofvendorId
.platform dataplatformData
(Consumer<BGFXPlatformData> consumer) Passes theplatformData()
field to the specifiedConsumer
.platformData
(BGFXPlatformData value) Copies the specifiedBGFXPlatformData
to theplatformData()
field.boolean
profile()
enable device for profilingprofile
(boolean value) Sets the specified value to theprofile()
field.backbuffer resolution and reset parametersresolution
(Consumer<BGFXResolution> consumer) Passes theresolution()
field to the specifiedConsumer
.resolution
(BGFXResolution value) Copies the specifiedBGFXResolution
to theresolution()
field.set
(int type, short vendorId, short deviceId, long capabilities, boolean debug, boolean profile, BGFXPlatformData platformData, BGFXResolution resolution, BGFXInitLimits limits, BGFXCallbackInterface callback, BGFXAllocatorInterface allocator) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
type()
select rendering backend.type
(int value) Sets the specified value to thetype()
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.short
vendorId()
vendor PCI id.vendorId
(short value) Sets the specified value to thevendorId()
field.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. -
TYPE
public static final int TYPEThe struct member offsets. -
VENDORID
public static final int VENDORIDThe struct member offsets. -
DEVICEID
public static final int DEVICEIDThe struct member offsets. -
CAPABILITIES
public static final int CAPABILITIESThe struct member offsets. -
DEBUG
public static final int DEBUGThe struct member offsets. -
PROFILE
public static final int PROFILEThe struct member offsets. -
PLATFORMDATA
public static final int PLATFORMDATAThe struct member offsets. -
RESOLUTION
public static final int RESOLUTIONThe struct member offsets. -
LIMITS
public static final int LIMITSThe struct member offsets. -
CALLBACK
public static final int CALLBACKThe struct member offsets. -
ALLOCATOR
public static final int ALLOCATORThe struct member offsets.
-
-
Constructor Details
-
BGFXInit
Creates aBGFXInit
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)
. -
type
public int type()select rendering backend. When set toRENDERER_TYPE_COUNT
a default rendering backend will be selected appropriate to the platform. One of: -
vendorId
public short vendorId()vendor PCI id. If set toPCI_ID_NONE
it will select the first device. One of:PCI_ID_NONE
PCI_ID_SOFTWARE_RASTERIZER
PCI_ID_AMD
PCI_ID_APPLE
PCI_ID_INTEL
PCI_ID_NVIDIA
PCI_ID_MICROSOFT
PCI_ID_ARM
-
deviceId
public short deviceId()device ID. If set to 0 it will select first device, or device with matching ID. -
capabilities
public long capabilities()capabilities initialization mask (default:UINT64_MAX
) -
debug
public boolean debug()enable device for debugging -
profile
public boolean profile()enable device for profiling -
platformData
platform data -
resolution
backbuffer resolution and reset parameters -
limits
configurable runtime limits parameters -
callback
provide application specific callback interface -
allocator
custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe. -
type
Sets the specified value to thetype()
field. -
vendorId
Sets the specified value to thevendorId()
field. -
deviceId
Sets the specified value to thedeviceId()
field. -
capabilities
Sets the specified value to thecapabilities()
field. -
debug
Sets the specified value to thedebug()
field. -
profile
Sets the specified value to theprofile()
field. -
platformData
Copies the specifiedBGFXPlatformData
to theplatformData()
field. -
platformData
Passes theplatformData()
field to the specifiedConsumer
. -
resolution
Copies the specifiedBGFXResolution
to theresolution()
field. -
resolution
Passes theresolution()
field to the specifiedConsumer
. -
limits
Copies the specifiedBGFXInitLimits
to thelimits()
field. -
limits
-
callback
Sets the address of the specifiedBGFXCallbackInterface
to thecallback()
field. -
allocator
Sets the address of the specifiedBGFXAllocatorInterface
to theallocator()
field. -
set
public BGFXInit set(int type, short vendorId, short deviceId, long capabilities, boolean debug, boolean profile, BGFXPlatformData platformData, BGFXResolution resolution, BGFXInitLimits limits, @Nullable BGFXCallbackInterface callback, @Nullable BGFXAllocatorInterface allocator) 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 newBGFXInit
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newBGFXInit
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newBGFXInit
instance allocated withBufferUtils
. -
create
Returns a newBGFXInit
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 newBGFXInit
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newBGFXInit
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype()
. -
nvendorId
public static short nvendorId(long struct) Unsafe version ofvendorId()
. -
ndeviceId
public static short ndeviceId(long struct) Unsafe version ofdeviceId()
. -
ncapabilities
public static long ncapabilities(long struct) Unsafe version ofcapabilities()
. -
ndebug
public static boolean ndebug(long struct) Unsafe version ofdebug()
. -
nprofile
public static boolean nprofile(long struct) Unsafe version ofprofile()
. -
nplatformData
Unsafe version ofplatformData()
. -
nresolution
Unsafe version ofresolution()
. -
nlimits
Unsafe version oflimits()
. -
ncallback
Unsafe version ofcallback()
. -
nallocator
Unsafe version ofallocator()
. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype
. -
nvendorId
public static void nvendorId(long struct, short value) Unsafe version ofvendorId
. -
ndeviceId
public static void ndeviceId(long struct, short value) Unsafe version ofdeviceId
. -
ncapabilities
public static void ncapabilities(long struct, long value) Unsafe version ofcapabilities
. -
ndebug
public static void ndebug(long struct, boolean value) Unsafe version ofdebug
. -
nprofile
public static void nprofile(long struct, boolean value) Unsafe version ofprofile
. -
nplatformData
Unsafe version ofplatformData
. -
nresolution
Unsafe version ofresolution
. -
nlimits
Unsafe version oflimits
. -
ncallback
Unsafe version ofcallback
. -
nallocator
Unsafe version ofallocator
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-