pub fn new(instance: &VkInstance, config: &DebugReportConfig) -> VkResult<VkDebugReport> {

        // load the debug extension.
        let loader = ash::extensions::ext::DebugReport::new(&instance.entry, &instance.handle);

        // configure debug callback.
        let debug_callback_ci = VkDebugReport::create_info(config);

        let callback = unsafe {
            loader.create_debug_report_callback(&debug_callback_ci, None)
                .or(Err(VkError::create("Debug Report Callback")))?
        };

        let report = VkDebugReport { loader, callback };
        Ok(report)
    }
/// Initialize debug extension loader and `vk::DebugReport` object.
Initialize debug extension loader and `vk::DebugReport` object.
Initialize debug extension loader and ` vk :: DebugReport ` object .
pub fn new(instance: &VkInstance, config: &DebugReportConfig) -> VkResult<VkDebugReport> {
        // load the debug extension.
        let loader = ash::extensions::ext::DebugReport::new(&instance.entry, &instance.handle);
        // configure debug callback.
        let debug_callback_ci = VkDebugReport::create_info(config);
        let callback = unsafe {
            loader.create_debug_report_callback(&debug_callback_ci, None)
                .or(Err(VkError::create("Debug Report Callback")))?
        };
        let report = VkDebugReport { loader, callback };
        Ok(report)
    }
pub fn new ( instance : & VkInstance , config : & DebugReportConfig ) -> VkResult < VkDebugReport > { // load the debug extension. let loader = ash :: extensions :: ext :: DebugReport :: new ( & instance . entry , & instance . handle ) ; // configure debug callback. let debug_callback_ci = VkDebugReport :: create_info ( config ) ; let callback = unsafe { loader . create_debug_report_callback ( & debug_callback_ci , None ) . or ( Err ( VkError :: create ( " " ) ) ) ? } ; let report = VkDebugReport { loader , callback } ; Ok ( report ) }
Initialize debug extension loader and `vk::DebugReport` object.
Initialize debug extension loader and ` vk :: DebugReport ` object .
instance
&VkInstance
config
&DebugReportConfig
instance
&VkInstance
config
&DebugReportConfig