Package org.lwjgl.bgfx
Class BGFXInit
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.bgfx.BGFXInit
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BGFXInit extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceInitialization parameters used byinit.Layout
struct bgfx_init_t { bgfx_renderer_type_ttype(); uint16_tvendorId(); uint16_tdeviceId(); uint64_tcapabilities(); booldebug(); boolprofile();bgfx_platform_data_tplatformData();bgfx_resolution_tresolution();bgfx_init_limits_tlimits();bgfx_callback_interface_t*callback();bgfx_allocator_interface_t*allocator(); }
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intALLOCATOR
CALLBACK
CAPABILITIES
DEBUG
DEVICEID
LIMITS
PLATFORMDATA
PROFILE
RESOLUTIONThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
VENDORIDThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BGFXInit(java.nio.ByteBuffer container)Creates aBGFXInitinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BGFXAllocatorInterfaceallocator()custom allocator.BGFXInitallocator(BGFXAllocatorInterface value)Sets the address of the specifiedBGFXAllocatorInterfaceto theallocator()field.BGFXCallbackInterfacecallback()provide application specific callback interfaceBGFXInitcallback(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 BGFXInitcallocStack()Deprecated.static BGFXInitcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcapabilities()capabilities initialization mask (default:UINT64_MAX)BGFXInitcapabilities(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 BGFXInitcreateSafe(long address)booleandebug()enable device for debuggingBGFXInitdebug(boolean value)Sets the specified value to thedebug()field.shortdeviceId()device id.BGFXInitdeviceId(short value)Sets the specified value to thedeviceId()field.BGFXInitLimitslimits()configurable runtime limits parametersBGFXInitlimits(java.util.function.Consumer<BGFXInitLimits> consumer)Passes thelimits()field to the specifiedConsumer.BGFXInitlimits(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 BGFXInitmallocStack()Deprecated.static BGFXInitmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BGFXAllocatorInterfacenallocator(long struct)Unsafe version ofallocator().static voidnallocator(long struct, BGFXAllocatorInterface value)Unsafe version ofallocator.static BGFXCallbackInterfacencallback(long struct)Unsafe version ofcallback().static voidncallback(long struct, 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.BGFXPlatformDataplatformData()platform dataBGFXInitplatformData(java.util.function.Consumer<BGFXPlatformData> consumer)Passes theplatformData()field to the specifiedConsumer.BGFXInitplatformData(BGFXPlatformData value)Copies the specifiedBGFXPlatformDatato theplatformData()field.booleanprofile()enable device for profilingBGFXInitprofile(boolean value)Sets the specified value to theprofile()field.BGFXResolutionresolution()backbuffer resolution and reset parametersBGFXInitresolution(java.util.function.Consumer<BGFXResolution> consumer)Passes theresolution()field to the specifiedConsumer.BGFXInitresolution(BGFXResolution value)Copies the specifiedBGFXResolutionto theresolution()field.BGFXInitset(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.BGFXInitset(BGFXInit src)Copies the specified struct data to this struct.intsizeof()inttype()select rendering backend.BGFXInittype(int value)Sets the specified value to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.shortvendorId()vendor PCI id.BGFXInitvendorId(short value)Sets the specified value to thevendorId()field.
-
-
-
Constructor Detail
-
BGFXInit
public BGFXInit(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
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_MICROSOFT
-
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
public BGFXPlatformData platformData()
platform data
-
resolution
public BGFXResolution resolution()
backbuffer resolution and reset parameters
-
limits
public BGFXInitLimits limits()
configurable runtime limits parameters
-
callback
@Nullable public BGFXCallbackInterface callback()
provide application specific callback interface
-
allocator
@Nullable public BGFXAllocatorInterface allocator()
custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.
-
vendorId
public BGFXInit vendorId(short value)
Sets the specified value to thevendorId()field.
-
deviceId
public BGFXInit deviceId(short value)
Sets the specified value to thedeviceId()field.
-
capabilities
public BGFXInit capabilities(long value)
Sets the specified value to thecapabilities()field.
-
platformData
public BGFXInit platformData(BGFXPlatformData value)
Copies the specifiedBGFXPlatformDatato theplatformData()field.
-
platformData
public BGFXInit platformData(java.util.function.Consumer<BGFXPlatformData> consumer)
Passes theplatformData()field to the specifiedConsumer.
-
resolution
public BGFXInit resolution(BGFXResolution value)
Copies the specifiedBGFXResolutionto theresolution()field.
-
resolution
public BGFXInit resolution(java.util.function.Consumer<BGFXResolution> consumer)
Passes theresolution()field to the specifiedConsumer.
-
limits
public BGFXInit limits(BGFXInitLimits value)
Copies the specifiedBGFXInitLimitsto thelimits()field.
-
limits
public BGFXInit limits(java.util.function.Consumer<BGFXInitLimits> consumer)
Passes thelimits()field to the specifiedConsumer.
-
callback
public BGFXInit callback(@Nullable BGFXCallbackInterface value)
Sets the address of the specifiedBGFXCallbackInterfaceto thecallback()field.
-
allocator
public BGFXInit allocator(@Nullable BGFXAllocatorInterface value)
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
public BGFXInit set(BGFXInit src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static BGFXInit malloc()
Returns a newBGFXInitinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BGFXInit calloc()
Returns a newBGFXInitinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BGFXInit create()
Returns a newBGFXInitinstance allocated withBufferUtils.
-
create
public static BGFXInit create(long address)
Returns a newBGFXInitinstance for the specified memory address.
-
createSafe
@Nullable public static BGFXInit createSafe(long address)
-
mallocStack
@Deprecated public static BGFXInit mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXInit callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BGFXInit mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BGFXInit callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
malloc
public static BGFXInit malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBGFXInitinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BGFXInit calloc(org.lwjgl.system.MemoryStack stack)
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
public static BGFXPlatformData nplatformData(long struct)
Unsafe version ofplatformData().
-
nresolution
public static BGFXResolution nresolution(long struct)
Unsafe version ofresolution().
-
nlimits
public static BGFXInitLimits nlimits(long struct)
Unsafe version oflimits().
-
ncallback
@Nullable public static BGFXCallbackInterface ncallback(long struct)
Unsafe version ofcallback().
-
nallocator
@Nullable public static BGFXAllocatorInterface nallocator(long struct)
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
public static void nplatformData(long struct, BGFXPlatformData value)Unsafe version ofplatformData.
-
nresolution
public static void nresolution(long struct, BGFXResolution value)Unsafe version ofresolution.
-
nlimits
public static void nlimits(long struct, BGFXInitLimits value)Unsafe version oflimits.
-
ncallback
public static void ncallback(long struct, @Nullable BGFXCallbackInterface value)Unsafe version ofcallback.
-
nallocator
public static void nallocator(long struct, @Nullable BGFXAllocatorInterface value)Unsafe version ofallocator.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-