Struct vulkano_util::context::VulkanoContext
source · [−]pub struct VulkanoContext { /* private fields */ }
Expand description
A utility struct to create, access and hold alive Vulkano device, instance and queues.
Vulkano context is used in the creation of your graphics or compute pipelines, images and
in the creation of [VulkanoWindowRenderer
] through [VulkanoWindows
].
Example
use vulkano_util::context::{VulkanoConfig, VulkanoContext};
fn test() {
let context = VulkanoContext::new(VulkanoConfig::default());
// Then create event loop, windows, pipelines, etc.
}
Implementations
sourceimpl VulkanoContext
impl VulkanoContext
sourcepub fn new(config: VulkanoConfig) -> Self
pub fn new(config: VulkanoConfig) -> Self
sourcepub fn device_name(&self) -> &str
pub fn device_name(&self) -> &str
Check device name
sourcepub fn device_type(&self) -> PhysicalDeviceType
pub fn device_type(&self) -> PhysicalDeviceType
Check device type
sourcepub fn max_memory(&self) -> u32
pub fn max_memory(&self) -> u32
Check device memory count
sourcepub fn graphics_queue(&self) -> Arc<Queue>
pub fn graphics_queue(&self) -> Arc<Queue>
Access rendering queue
sourcepub fn compute_queue(&self) -> Arc<Queue>
pub fn compute_queue(&self) -> Arc<Queue>
Access compute queue. Depending on your device, this might be the same as graphics queue.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VulkanoContext
impl Send for VulkanoContext
impl Sync for VulkanoContext
impl Unpin for VulkanoContext
impl UnwindSafe for VulkanoContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more