Type Alias bgfx_sys::bgfx_init_t
source · pub type bgfx_init_t = bgfx_init_s;
Expand description
Initialization parameters used by bgfx::init
.
Aliased Type§
struct bgfx_init_t {
pub type_: u32,
pub vendorId: u16,
pub deviceId: u16,
pub capabilities: u64,
pub debug: bool,
pub profile: bool,
pub platformData: bgfx_platform_data_s,
pub resolution: bgfx_resolution_s,
pub limits: bgfx_init_limits_s,
pub callback: *mut bgfx_callback_interface_s,
pub allocator: *mut bgfx_allocator_interface_s,
}
Fields§
§type_: u32
Select rendering backend. When set to RendererType::Count
a default rendering backend will be selected appropriate to the platform.
See: bgfx::RendererType
vendorId: u16
Vendor PCI ID. If set to BGFX_PCI_ID_NONE
, discrete and integrated
GPUs will be prioritised.
BGFX_PCI_ID_NONE
- Autoselect adapter.BGFX_PCI_ID_SOFTWARE_RASTERIZER
- Software rasterizer.BGFX_PCI_ID_AMD
- AMD adapter.BGFX_PCI_ID_APPLE
- Apple adapter.BGFX_PCI_ID_INTEL
- Intel adapter.BGFX_PCI_ID_NVIDIA
- NVIDIA adapter.BGFX_PCI_ID_MICROSOFT
- Microsoft adapter.
deviceId: u16
Device ID. If set to 0 it will select first device, or device with matching ID.
capabilities: u64
§debug: bool
Capabilities initialization mask (default: UINT64_MAX).
profile: bool
Enable device for debugging.
platformData: bgfx_platform_data_s
Enable device for profiling.
resolution: bgfx_resolution_s
Platform data.
limits: bgfx_init_limits_s
Backbuffer resolution and reset parameters. See: bgfx::Resolution
.
callback: *mut bgfx_callback_interface_s
Provide application specific callback interface.
See: bgfx::CallbackI
allocator: *mut bgfx_allocator_interface_s
Custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.