public class BGFXInit
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
init.
type – select rendering backend. When set to RENDERER_TYPE_COUNT a default rendering backend will be selected appropriate to the platform. One of:vendorId – vendor PCI id. If set to PCI_ID_NONE it will select the first device. One of:PCI_ID_NONE | PCI_ID_SOFTWARE_RASTERIZER | PCI_ID_AMD | PCI_ID_INTEL | PCI_ID_NVIDIA |
deviceId – device id. If set to 0 it will select first device, or device with matching id.debug – enable device for debuggingprofile – enable device for profilingplatformData – platform dataresolution – backbuffer resolution and reset parameterscallback – provide application specific callback interfaceallocator – custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.
struct bgfx_init_t {
bgfx_renderer_type_t type;
uint16_t vendorId;
uint16_t deviceId;
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;
}| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ALLOCATOR
The struct member offsets.
|
static int |
CALLBACK
The struct member offsets.
|
static int |
DEBUG
The struct member offsets.
|
static int |
DEVICEID
The struct member offsets.
|
static int |
LIMITS
The struct member offsets.
|
static int |
PLATFORMDATA
The struct member offsets.
|
static int |
PROFILE
The struct member offsets.
|
static int |
RESOLUTION
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TYPE
The struct member offsets.
|
static int |
VENDORID
The struct member offsets.
|
| Constructor and Description |
|---|
BGFXInit(java.nio.ByteBuffer container)
Creates a
BGFXInit instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
BGFXAllocatorInterface |
allocator()
Returns a
BGFXAllocatorInterface view of the struct pointed to by the allocator field. |
BGFXInit |
allocator(BGFXAllocatorInterface value)
Sets the address of the specified
BGFXAllocatorInterface to the allocator field. |
BGFXCallbackInterface |
callback()
Returns a
BGFXCallbackInterface view of the struct pointed to by the callback field. |
BGFXInit |
callback(BGFXCallbackInterface value)
Sets the address of the specified
BGFXCallbackInterface to the callback field. |
static BGFXInit |
calloc()
Returns a new
BGFXInit instance allocated with memCalloc. |
static BGFXInit |
callocStack()
Returns a new
BGFXInit instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static BGFXInit |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInit instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static BGFXInit |
create()
Returns a new
BGFXInit instance allocated with BufferUtils. |
static BGFXInit |
create(long address)
Returns a new
BGFXInit instance for the specified memory address. |
static BGFXInit |
createSafe(long address)
|
boolean |
debug()
Returns the value of the
debug field. |
BGFXInit |
debug(boolean value)
Sets the specified value to the
debug field. |
short |
deviceId()
Returns the value of the
deviceId field. |
BGFXInit |
deviceId(short value)
Sets the specified value to the
deviceId field. |
BGFXInitLimits |
limits()
Returns a
BGFXInitLimits view of the limits field. |
BGFXInit |
limits(BGFXInitLimits value)
Copies the specified
BGFXInitLimits to the limits field. |
BGFXInit |
limits(java.util.function.Consumer<BGFXInitLimits> consumer)
Passes the
limits field to the specified Consumer. |
static BGFXInit |
malloc()
Returns a new
BGFXInit instance allocated with memAlloc. |
static BGFXInit |
mallocStack()
Returns a new
BGFXInit instance allocated on the thread-local MemoryStack. |
static BGFXInit |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
BGFXInit instance allocated on the specified MemoryStack. |
static BGFXAllocatorInterface |
nallocator(long struct)
Unsafe version of
allocator(). |
static void |
nallocator(long struct,
BGFXAllocatorInterface value)
Unsafe version of
allocator. |
static BGFXCallbackInterface |
ncallback(long struct)
Unsafe version of
callback(). |
static void |
ncallback(long struct,
BGFXCallbackInterface value)
Unsafe version of
callback. |
static boolean |
ndebug(long struct)
Unsafe version of
debug(). |
static void |
ndebug(long struct,
boolean value)
Unsafe version of
debug. |
static short |
ndeviceId(long struct)
Unsafe version of
deviceId(). |
static void |
ndeviceId(long struct,
short value)
Unsafe version of
deviceId. |
static BGFXInitLimits |
nlimits(long struct)
Unsafe version of
limits(). |
static void |
nlimits(long struct,
BGFXInitLimits value)
Unsafe version of
limits. |
static BGFXPlatformData |
nplatformData(long struct)
Unsafe version of
platformData(). |
static void |
nplatformData(long struct,
BGFXPlatformData value)
Unsafe version of
platformData. |
static boolean |
nprofile(long struct)
Unsafe version of
profile(). |
static void |
nprofile(long struct,
boolean value)
Unsafe version of
profile. |
static BGFXResolution |
nresolution(long struct)
Unsafe version of
resolution(). |
static void |
nresolution(long struct,
BGFXResolution value)
Unsafe version of
resolution. |
static int |
ntype(long struct)
Unsafe version of
type(). |
static void |
ntype(long struct,
int value)
Unsafe version of
type. |
static short |
nvendorId(long struct)
Unsafe version of
vendorId(). |
static void |
nvendorId(long struct,
short value)
Unsafe version of
vendorId. |
BGFXPlatformData |
platformData()
Returns a
BGFXPlatformData view of the platformData field. |
BGFXInit |
platformData(BGFXPlatformData value)
Copies the specified
BGFXPlatformData to the platformData field. |
BGFXInit |
platformData(java.util.function.Consumer<BGFXPlatformData> consumer)
Passes the
platformData field to the specified Consumer. |
boolean |
profile()
Returns the value of the
profile field. |
BGFXInit |
profile(boolean value)
Sets the specified value to the
profile field. |
BGFXResolution |
resolution()
Returns a
BGFXResolution view of the resolution field. |
BGFXInit |
resolution(BGFXResolution value)
Copies the specified
BGFXResolution to the resolution field. |
BGFXInit |
resolution(java.util.function.Consumer<BGFXResolution> consumer)
Passes the
resolution field to the specified Consumer. |
BGFXInit |
set(BGFXInit src)
Copies the specified struct data to this struct.
|
BGFXInit |
set(int type,
short vendorId,
short deviceId,
boolean debug,
boolean profile,
BGFXPlatformData platformData,
BGFXResolution resolution,
BGFXInitLimits limits,
BGFXCallbackInterface callback,
BGFXAllocatorInterface allocator)
Initializes this struct with the specified values.
|
int |
sizeof() |
int |
type()
Returns the value of the
type field. |
BGFXInit |
type(int value)
Sets the specified value to the
type field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
short |
vendorId()
Returns the value of the
vendorId field. |
BGFXInit |
vendorId(short value)
Sets the specified value to the
vendorId field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int TYPE
public static final int VENDORID
public static final int DEVICEID
public static final int DEBUG
public static final int PROFILE
public static final int PLATFORMDATA
public static final int RESOLUTION
public static final int LIMITS
public static final int CALLBACK
public static final int ALLOCATOR
public BGFXInit(java.nio.ByteBuffer container)
BGFXInit instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int type()
type field.public short vendorId()
vendorId field.public short deviceId()
deviceId field.public boolean debug()
debug field.public boolean profile()
profile field.public BGFXPlatformData platformData()
BGFXPlatformData view of the platformData field.public BGFXResolution resolution()
BGFXResolution view of the resolution field.public BGFXInitLimits limits()
BGFXInitLimits view of the limits field.@Nullable public BGFXCallbackInterface callback()
BGFXCallbackInterface view of the struct pointed to by the callback field.@Nullable public BGFXAllocatorInterface allocator()
BGFXAllocatorInterface view of the struct pointed to by the allocator field.public BGFXInit type(int value)
type field.public BGFXInit vendorId(short value)
vendorId field.public BGFXInit deviceId(short value)
deviceId field.public BGFXInit debug(boolean value)
debug field.public BGFXInit profile(boolean value)
profile field.public BGFXInit platformData(BGFXPlatformData value)
BGFXPlatformData to the platformData field.public BGFXInit platformData(java.util.function.Consumer<BGFXPlatformData> consumer)
platformData field to the specified Consumer.public BGFXInit resolution(BGFXResolution value)
BGFXResolution to the resolution field.public BGFXInit resolution(java.util.function.Consumer<BGFXResolution> consumer)
resolution field to the specified Consumer.public BGFXInit limits(BGFXInitLimits value)
BGFXInitLimits to the limits field.public BGFXInit limits(java.util.function.Consumer<BGFXInitLimits> consumer)
limits field to the specified Consumer.public BGFXInit callback(@Nullable BGFXCallbackInterface value)
BGFXCallbackInterface to the callback field.public BGFXInit allocator(@Nullable BGFXAllocatorInterface value)
BGFXAllocatorInterface to the allocator field.public BGFXInit set(int type, short vendorId, short deviceId, boolean debug, boolean profile, BGFXPlatformData platformData, BGFXResolution resolution, BGFXInitLimits limits, @Nullable BGFXCallbackInterface callback, @Nullable BGFXAllocatorInterface allocator)
public BGFXInit set(BGFXInit src)
src - the source structpublic static BGFXInit malloc()
BGFXInit instance allocated with memAlloc. The instance must be explicitly freed.public static BGFXInit calloc()
BGFXInit instance allocated with memCalloc. The instance must be explicitly freed.public static BGFXInit create()
BGFXInit instance allocated with BufferUtils.public static BGFXInit create(long address)
BGFXInit instance for the specified memory address.@Nullable public static BGFXInit createSafe(long address)
public static BGFXInit mallocStack()
BGFXInit instance allocated on the thread-local MemoryStack.public static BGFXInit callocStack()
BGFXInit instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static BGFXInit mallocStack(org.lwjgl.system.MemoryStack stack)
BGFXInit instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static BGFXInit callocStack(org.lwjgl.system.MemoryStack stack)
BGFXInit instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static int ntype(long struct)
type().public static short nvendorId(long struct)
vendorId().public static short ndeviceId(long struct)
deviceId().public static boolean ndebug(long struct)
debug().public static boolean nprofile(long struct)
profile().public static BGFXPlatformData nplatformData(long struct)
platformData().public static BGFXResolution nresolution(long struct)
resolution().public static BGFXInitLimits nlimits(long struct)
limits().@Nullable public static BGFXCallbackInterface ncallback(long struct)
callback().@Nullable public static BGFXAllocatorInterface nallocator(long struct)
allocator().public static void ntype(long struct,
int value)
type.public static void nvendorId(long struct,
short value)
vendorId.public static void ndeviceId(long struct,
short value)
deviceId.public static void ndebug(long struct,
boolean value)
debug.public static void nprofile(long struct,
boolean value)
profile.public static void nplatformData(long struct,
BGFXPlatformData value)
platformData.public static void nresolution(long struct,
BGFXResolution value)
resolution.public static void nlimits(long struct,
BGFXInitLimits value)
limits.public static void ncallback(long struct,
@Nullable
BGFXCallbackInterface value)
callback.public static void nallocator(long struct,
@Nullable
BGFXAllocatorInterface value)
allocator.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.