Struct bgfx_sys::bgfx_init_s

source ·
#[repr(C)]
pub struct bgfx_init_s { pub type_: bgfx_renderer_type_t, pub vendorId: u16, pub deviceId: u16, pub capabilities: u64, pub debug: bool, pub profile: bool, pub platformData: bgfx_platform_data_t, pub resolution: bgfx_resolution_t, pub limits: bgfx_init_limits_t, pub callback: *mut bgfx_callback_interface_t, pub allocator: *mut bgfx_allocator_interface_t, }
Expand description

Initialization parameters used by bgfx::init.

Fields§

§type_: bgfx_renderer_type_t

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_t

Enable device for profiling.

§resolution: bgfx_resolution_t

Platform data.

§limits: bgfx_init_limits_t

Backbuffer resolution and reset parameters. See: bgfx::Resolution.

§callback: *mut bgfx_callback_interface_t

Provide application specific callback interface. See: bgfx::CallbackI

§allocator: *mut bgfx_allocator_interface_t

Custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.

Trait Implementations§

source§

impl Clone for bgfx_init_s

source§

fn clone(&self) -> bgfx_init_s

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for bgfx_init_s

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for bgfx_init_s

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.