Struct ccthw_ash_instance::VulkanInstance
source · pub struct VulkanInstance { /* private fields */ }
Expand description
The Ash instance, entry, and additional data provided when the instance was created.
Implementations§
source§impl VulkanInstance
impl VulkanInstance
sourcepub unsafe fn new(
required_extensions: &[String],
required_layers: &[String]
) -> InstanceResult<Self>
pub unsafe fn new( required_extensions: &[String], required_layers: &[String] ) -> InstanceResult<Self>
Create a new Vulkan instance.
Params
required_extensions
- All of the extension names required by this application. The DebugUtils extension is added automatically when compiled with debug assertions enabled.required_layers
- All of the layers required by this application.
Returns
The Vulkan Instance or an InstanceError if any of the extensions or layers are unavailable.
Safety
Unsafe because:
- The Application must ensure that all device resources created with the instance are destroyed proior to dropping this struct.
sourcepub fn extensions(&self) -> &[String]
pub fn extensions(&self) -> &[String]
The extensions used to creat this Vulkan Instance.
sourcepub fn debug_utils_set_object_name(
&self,
logical_device: &Device,
name_info: &DebugUtilsObjectNameInfoEXT
)
pub fn debug_utils_set_object_name( &self, logical_device: &Device, name_info: &DebugUtilsObjectNameInfoEXT )
Set the debug name for an object owned by the provided logical device.
This is a no-op for release builds.
Params
logical_device
- the logical Vulkan device used to create the object referenced by the name info struct.name_info
- the name info struct containing the targeted object and its new name.