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.

§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.

Implementations§

source§

impl Init

source

pub fn new() -> Init

Auto Trait Implementations§

§

impl Freeze for Init

§

impl RefUnwindSafe for Init

§

impl !Send for Init

§

impl !Sync for Init

§

impl Unpin for Init

§

impl UnwindSafe for Init

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, 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.