Struct bgfx_rs::static_lib::Init
source · #[repr(C)]pub struct Init {
pub type_r: RendererType,
pub vendor_id: u16,
pub device_id: u16,
pub capabilities: u64,
pub debug: bool,
pub profile: bool,
pub platform_data: PlatformData,
pub resolution: Resolution,
pub limits: InitLimits,
pub callback: *const u8,
pub allocator: *const u8,
}
Expand description
Initialization parameters used by bgfx::init
.
Fields§
§type_r: RendererType
Select rendering backend. When set to RendererType::Count
a default rendering backend will be selected appropriate to the platform.
See: bgfx::RendererType
vendor_id: u16
Vendor PCI ID. If set to PciIdFlags::NONE, discrete and integrated GPUs will be prioritised.
- PciIdFlags::NONE - Autoselect adapter.
- PciIdFlags::SOFTWARE_RASTERIZER - Software rasterizer.
- PciIdFlags::AMD - AMD adapter.
- PciIdFlags::APPLE - Apple adapter.
- PciIdFlags::INTEL - Intel adapter.
- PciIdFlags::NVIDIA - NVIDIA adapter.
- PciIdFlags::MICROSOFT - Microsoft adapter.
device_id: u16
Device ID. If set to 0 it will select first device, or device with matching ID.
capabilities: u64
Capabilities initialization mask (default: UINT64_MAX).
debug: bool
Enable device for debugging.
profile: bool
Enable device for profiling.
platform_data: PlatformData
Platform data.
resolution: Resolution
Backbuffer resolution and reset parameters. See: bgfx::Resolution
.
limits: InitLimits
Configurable runtime limits parameters.
callback: *const u8
Provide application specific callback interface.
See: bgfx::uint8_t
allocator: *const u8
Custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.