Struct basalt::Basalt

source ·
pub struct Basalt { /* private fields */ }

Implementations§

source§

impl Basalt

source

pub fn initialize( options: BstOptions, result_fn: Box<dyn Fn(Result<Arc<Self>, String>) + Send + Sync> )

Begin initializing Basalt, this thread will be taken for window event polling and the function provided in result_fn will be executed after Basalt initialization has completed or errored.

source

pub fn poll_events(&self) -> Vec<BstEvent>

Panics:
  • Panics if the current cofiguration is an app_loop.
source

pub fn input_ref(&self) -> &Input

source

pub fn interval(&self) -> Arc<Interval>

source

pub fn interval_ref(&self) -> &Arc<Interval>

source

pub fn interface(&self) -> Arc<Interface>

source

pub fn interface_ref(&self) -> &Arc<Interface>

source

pub fn atlas(&self) -> Arc<Atlas>

source

pub fn atlas_ref(&self) -> &Arc<Atlas>

source

pub fn device(&self) -> Arc<Device>

source

pub fn device_ref(&self) -> &Arc<Device>

source

pub fn compute_queue(&self) -> Arc<Queue>

Notes:
  • This queue may be the same as the graphics queue in cases where the device only has a single queue present.
source

pub fn compute_queue_ref(&self) -> &Arc<Queue>

Notes:
  • This queue may be the same as the graphics queue in cases where the device only has a single queue present.
source

pub fn transfer_queue(&self) -> Arc<Queue>

Notes:
  • This queue may be the same as the compute queue in cases where the device only has two queues present. In cases where there is only one queue the graphics, compute, and transfer queues will all be the same queue.
source

pub fn transfer_queue_ref(&self) -> &Arc<Queue>

Notes:
  • This queue may be the same as the compute queue in cases where the device only has two queues present. In cases where there is only one queue the graphics, compute, and transfer queues will all be the same queue.
source

pub fn graphics_queue(&self) -> Arc<Queue>

source

pub fn graphics_queue_ref(&self) -> &Arc<Queue>

source

pub fn secondary_compute_queue(&self) -> Option<Arc<Queue>>

source

pub fn secondary_compute_queue_ref(&self) -> Option<&Arc<Queue>>

source

pub fn secondary_transfer_queue(&self) -> Option<Arc<Queue>>

source

pub fn secondary_transfer_queue_ref(&self) -> Option<&Arc<Queue>>

source

pub fn secondary_graphics_queue(&self) -> Option<Arc<Queue>>

source

pub fn secondary_graphics_queue_ref(&self) -> Option<&Arc<Queue>>

source

pub fn physical_device_ref(&self) -> &Arc<PhysicalDevice>

source

pub fn physical_device(&self) -> Arc<PhysicalDevice>

source

pub fn surface_capabilities( &self, fse: FullScreenExclusive ) -> SurfaceCapabilities

source

pub fn surface_formats( &self, fse: FullScreenExclusive ) -> Vec<(VkFormat, VkColorSpace)>

source

pub fn surface_present_modes(&self) -> Vec<PresentMode>

source

pub fn instance(&self) -> Arc<Instance>

source

pub fn instance_ref(&self) -> &Arc<Instance>

source

pub fn surface(&self) -> Arc<Surface>

source

pub fn surface_ref(&self) -> &Arc<Surface>

source

pub fn formats_in_use(&self) -> BstFormatsInUse

Returns list of Format’s used by Basalt.

source

pub fn current_extent(&self, fse: FullScreenExclusive) -> [u32; 2]

Get the current extent of the surface. In the case current extent is none, the window’s inner dimensions will be used instead.

source

pub fn wants_exit(&self) -> bool

source

pub fn window(&self) -> Arc<dyn BasaltWindow>

source

pub fn window_ref(&self) -> &Arc<dyn BasaltWindow>

source

pub fn options(&self) -> BstOptions

source

pub fn options_ref(&self) -> &BstOptions

source

pub fn exit(&self)

Signal the application to exit.

source

pub fn fps(&self) -> usize

Retrieve the current FPS.

Notes:
  • Returns zero if not configured for app_loop.
source

pub fn force_recreate_swapchain(&self)

Trigger the Swapchain to be recreated.

Notes:
  • Does nothing if not configured for app_loop.
source

pub fn wait_for_exit(&self) -> Result<(), String>

Wait for the application to exit.

Notes:
  • Always returns Ok if not configured for app_loop or the application has already closed.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Basalt

§

impl Send for Basalt

§

impl Sync for Basalt

§

impl Unpin for Basalt

§

impl !UnwindSafe for Basalt

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.