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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
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 BGFXAllocatorInterfaceallocator(@Nullable BGFXAllocatorInterface value) Sets the address of the specifiedBGFXAllocatorInterfaceto theallocatorfield.@Nullable BGFXCallbackInterfacecallback()callback(@Nullable BGFXCallbackInterface value) Sets the address of the specifiedBGFXCallbackInterfaceto thecallbackfield.static BGFXInitcalloc()Returns a newBGFXInitinstance allocated withmemCalloc.static BGFXInitcalloc(MemoryStack stack) Returns a newBGFXInitinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BGFXInitDeprecated.static BGFXInitcallocStack(MemoryStack stack) Deprecated.longcapabilities(long value) Sets the specified value to thecapabilitiesfield.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()debug(boolean value) Sets the specified value to thedebugfield.shortdeviceId()deviceId(short value) Sets the specified value to thedeviceIdfield.limits()limits(Consumer<BGFXInitLimits> consumer) Passes thelimitsfield to the specifiedConsumer.limits(BGFXInitLimits value) Copies the specifiedBGFXInitLimitsto thelimitsfield.static BGFXInitmalloc()Returns a newBGFXInitinstance allocated withmemAlloc.static BGFXInitmalloc(MemoryStack stack) Returns a newBGFXInitinstance allocated on the specifiedMemoryStack.static BGFXInitDeprecated.static BGFXInitmallocStack(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.platformData(Consumer<BGFXPlatformData> consumer) Passes theplatformDatafield to the specifiedConsumer.platformData(BGFXPlatformData value) Copies the specifiedBGFXPlatformDatato theplatformDatafield.booleanprofile()profile(boolean value) Sets the specified value to theprofilefield.resolution(Consumer<BGFXResolution> consumer) Passes theresolutionfield to the specifiedConsumer.resolution(BGFXResolution value) Copies the specifiedBGFXResolutionto theresolutionfield.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()Returnssizeof(struct).inttype()type(int value) Sets the specified value to thetypefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.shortvendorId()vendorId(short value) Sets the specified value to thevendorIdfield.Methods 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()Description copied from class:StructReturnssizeof(struct). -
type
public int type()- Returns:
- the value of the
typefield.
-
vendorId
public short vendorId()- Returns:
- the value of the
vendorIdfield.
-
deviceId
public short deviceId()- Returns:
- the value of the
deviceIdfield.
-
capabilities
public long capabilities()- Returns:
- the value of the
capabilitiesfield.
-
debug
public boolean debug()- Returns:
- the value of the
debugfield.
-
profile
public boolean profile()- Returns:
- the value of the
profilefield.
-
platformData
- Returns:
- a
BGFXPlatformDataview of theplatformDatafield.
-
resolution
- Returns:
- a
BGFXResolutionview of theresolutionfield.
-
limits
- Returns:
- a
BGFXInitLimitsview of thelimitsfield.
-
callback
- Returns:
- a
BGFXCallbackInterfaceview of the struct pointed to by thecallbackfield.
-
allocator
- Returns:
- a
BGFXAllocatorInterfaceview of the struct pointed to by theallocatorfield.
-
type
Sets the specified value to thetypefield. -
vendorId
Sets the specified value to thevendorIdfield. -
deviceId
Sets the specified value to thedeviceIdfield. -
capabilities
Sets the specified value to thecapabilitiesfield. -
debug
Sets the specified value to thedebugfield. -
profile
Sets the specified value to theprofilefield. -
platformData
Copies the specifiedBGFXPlatformDatato theplatformDatafield. -
platformData
Passes theplatformDatafield to the specifiedConsumer. -
resolution
Copies the specifiedBGFXResolutionto theresolutionfield. -
resolution
Passes theresolutionfield to the specifiedConsumer. -
limits
Copies the specifiedBGFXInitLimitsto thelimitsfield. -
limits
Passes thelimitsfield to the specifiedConsumer. -
callback
Sets the address of the specifiedBGFXCallbackInterfaceto thecallbackfield. -
allocator
Sets the address of the specifiedBGFXAllocatorInterfaceto theallocatorfield. -
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
-