Package org.lwjgl.bgfx
Class BGFXInit
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<BGFXInit>
org.lwjgl.bgfx.BGFXInit
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXInit
extends org.lwjgl.system.Struct<BGFXInit>
implements org.lwjgl.system.NativeResource
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
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 size in bytes.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionBGFXInit(ByteBuffer container) Creates aBGFXInitinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable BGFXAllocatorInterfacecustom allocator.allocator(@Nullable BGFXAllocatorInterface value) Sets the address of the specifiedBGFXAllocatorInterfaceto theallocator()field.@Nullable BGFXCallbackInterfacecallback()provide application specific callback interfacecallback(@Nullable BGFXCallbackInterface value) Sets the address of the specifiedBGFXCallbackInterfaceto thecallback()field.static BGFXInitcalloc()Returns a newBGFXInitinstance allocated withmemCalloc.static BGFXInitcalloc(org.lwjgl.system.MemoryStack stack) Returns a newBGFXInitinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXInitDeprecated.static BGFXInitcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.longcapabilities initialization mask (default:UINT64_MAX)capabilities(long value) Sets the specified value to thecapabilities()field.static BGFXInitcreate()Returns a newBGFXInitinstance allocated withBufferUtils.static BGFXInitcreate(long address) Returns a newBGFXInitinstance for the specified memory address.static @Nullable BGFXInitcreateSafe(long address) booleandebug()enable device for debuggingdebug(boolean value) Sets the specified value to thedebug()field.shortdeviceId()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 specifiedBGFXInitLimitsto thelimits()field.static BGFXInitmalloc()Returns a newBGFXInitinstance allocated withmemAlloc.static BGFXInitmalloc(org.lwjgl.system.MemoryStack stack) Returns a newBGFXInitinstance allocated on the specifiedMemoryStack.static BGFXInitDeprecated.static BGFXInitmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static @Nullable BGFXAllocatorInterfacenallocator(long struct) Unsafe version ofallocator().static voidnallocator(long struct, @Nullable BGFXAllocatorInterface value) Unsafe version ofallocator.static @Nullable BGFXCallbackInterfacencallback(long struct) Unsafe version ofcallback().static voidncallback(long struct, @Nullable BGFXCallbackInterface value) Unsafe version ofcallback.static longncapabilities(long struct) Unsafe version ofcapabilities().static voidncapabilities(long struct, long value) Unsafe version ofcapabilities.static booleanndebug(long struct) Unsafe version ofdebug().static voidndebug(long struct, boolean value) Unsafe version ofdebug.static shortndeviceId(long struct) Unsafe version ofdeviceId().static voidndeviceId(long struct, short value) Unsafe version ofdeviceId.static BGFXInitLimitsnlimits(long struct) Unsafe version oflimits().static voidnlimits(long struct, BGFXInitLimits value) Unsafe version oflimits.static BGFXPlatformDatanplatformData(long struct) Unsafe version ofplatformData().static voidnplatformData(long struct, BGFXPlatformData value) Unsafe version ofplatformData.static booleannprofile(long struct) Unsafe version ofprofile().static voidnprofile(long struct, boolean value) Unsafe version ofprofile.static BGFXResolutionnresolution(long struct) Unsafe version ofresolution().static voidnresolution(long struct, BGFXResolution value) Unsafe version ofresolution.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static shortnvendorId(long struct) Unsafe version ofvendorId().static voidnvendorId(long struct, short value) Unsafe version ofvendorId.platform dataplatformData(Consumer<BGFXPlatformData> consumer) Passes theplatformData()field to the specifiedConsumer.platformData(BGFXPlatformData value) Copies the specifiedBGFXPlatformDatato theplatformData()field.booleanprofile()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 specifiedBGFXResolutionto theresolution()field.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.Copies the specified struct data to this struct.intsizeof()inttype()select rendering backend.type(int value) Sets the specified value to thetype()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.shortvendorId()vendor PCI id.vendorId(short value) Sets the specified value to thevendorId()field.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. -
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 aBGFXInitinstance 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<BGFXInit>
-
type
public int type()select rendering backend. When set toRENDERER_TYPE_COUNTa default rendering backend will be selected appropriate to the platform. One of: -
vendorId
public short vendorId()vendor PCI id. If set toPCI_ID_NONEit will select the first device. One of:PCI_ID_NONEPCI_ID_SOFTWARE_RASTERIZERPCI_ID_AMDPCI_ID_APPLEPCI_ID_INTELPCI_ID_NVIDIAPCI_ID_MICROSOFTPCI_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 specifiedBGFXPlatformDatato theplatformData()field. -
platformData
Passes theplatformData()field to the specifiedConsumer. -
resolution
Copies the specifiedBGFXResolutionto theresolution()field. -
resolution
Passes theresolution()field to the specifiedConsumer. -
limits
Copies the specifiedBGFXInitLimitsto thelimits()field. -
limits
-
callback
Sets the address of the specifiedBGFXCallbackInterfaceto thecallback()field. -
allocator
Sets the address of the specifiedBGFXAllocatorInterfaceto 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 newBGFXInitinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newBGFXInitinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newBGFXInitinstance allocated withBufferUtils. -
create
Returns a newBGFXInitinstance 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 newBGFXInitinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newBGFXInitinstance allocated on the specifiedMemoryStackand 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
-