Package org.lwjgl.bgfx
Class BGFXInit
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct bgfx_init_t {
bgfx_renderer_type_t type;
uint16_t vendorId;
uint16_t deviceId;
uint64_t capabilities;
bool debug;
bool profile;
{@link BGFXPlatformData bgfx_platform_data_t} platformData;
{@link BGFXResolution bgfx_resolution_t} resolution;
{@link BGFXInitLimits bgfx_init_limits_t} limits;
{@link BGFXCallbackInterface bgfx_callback_interface_t} * callback;
{@link BGFXAllocatorInterface 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
FieldsModifier 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
ConstructorsConstructorDescriptionBGFXInit
(ByteBuffer container) Creates aBGFXInit
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescription@Nullable BGFXAllocatorInterface
allocator
(@Nullable BGFXAllocatorInterface value) Sets the address of the specifiedBGFXAllocatorInterface
to theallocator
field.@Nullable BGFXCallbackInterface
callback()
callback
(@Nullable 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
(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 @Nullable BGFXInit
createSafe
(long address) boolean
debug()
debug
(boolean value) Sets the specified value to thedebug
field.short
deviceId()
deviceId
(short value) Sets the specified value to thedeviceId
field.limits()
limits
(Consumer<BGFXInitLimits> consumer) Passes thelimits
field to the specifiedConsumer
.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 @Nullable BGFXAllocatorInterface
nallocator
(long struct) Unsafe version ofallocator()
.static void
nallocator
(long struct, @Nullable BGFXAllocatorInterface value) Unsafe version ofallocator
.static @Nullable BGFXCallbackInterface
ncallback
(long struct) Unsafe version ofcallback()
.static void
ncallback
(long struct, @Nullable 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
.platformData
(Consumer<BGFXPlatformData> consumer) Passes theplatformData
field to the specifiedConsumer
.platformData
(BGFXPlatformData value) Copies the specifiedBGFXPlatformData
to theplatformData
field.boolean
profile()
profile
(boolean value) Sets the specified value to theprofile
field.resolution
(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, @Nullable BGFXCallbackInterface callback, @Nullable BGFXAllocatorInterface allocator) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
type()
type
(int value) Sets the specified value to thetype
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.short
vendorId()
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()- Returns:
- the value of the
type
field.
-
vendorId
public short vendorId()- Returns:
- the value of the
vendorId
field.
-
deviceId
public short deviceId()- Returns:
- the value of the
deviceId
field.
-
capabilities
public long capabilities()- Returns:
- the value of the
capabilities
field.
-
debug
public boolean debug()- Returns:
- the value of the
debug
field.
-
profile
public boolean profile()- Returns:
- the value of the
profile
field.
-
platformData
- Returns:
- a
BGFXPlatformData
view of theplatformData
field.
-
resolution
- Returns:
- a
BGFXResolution
view of theresolution
field.
-
limits
- Returns:
- a
BGFXInitLimits
view of thelimits
field.
-
callback
- Returns:
- a
BGFXCallbackInterface
view of the struct pointed to by thecallback
field.
-
allocator
- Returns:
- a
BGFXAllocatorInterface
view of the struct pointed to by theallocator
field.
-
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
Passes thelimits
field to the specifiedConsumer
. -
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
-