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
Returns the name of the device.
sourcepub fn device_type(&self) -> PhysicalDeviceType
pub fn device_type(&self) -> PhysicalDeviceType
Returns the type of the device.
sourcepub fn max_memory(&self) -> u32
pub fn max_memory(&self) -> u32
Returns the maximum memory allocation of the device.
sourcepub fn graphics_queue(&self) -> &Arc<Queue>
pub fn graphics_queue(&self) -> &Arc<Queue>
Returns the graphics queue.
sourcepub fn compute_queue(&self) -> &Arc<Queue>
pub fn compute_queue(&self) -> &Arc<Queue>
Returns the 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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