Update the examples
This commit is contained in:
parent
03665e5555
commit
b5fc6d37f2
|
@ -9,7 +9,7 @@ use ash::extensions::Win32Surface;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
use ash::extensions::XlibSurface;
|
use ash::extensions::XlibSurface;
|
||||||
use ash::extensions::{DebugReport, Surface, Swapchain};
|
use ash::extensions::{DebugReport, Surface, Swapchain};
|
||||||
pub use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0, V1_0};
|
pub use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0,};
|
||||||
use ash::vk;
|
use ash::vk;
|
||||||
use ash::Device;
|
use ash::Device;
|
||||||
use ash::Entry;
|
use ash::Entry;
|
||||||
|
@ -205,9 +205,9 @@ pub fn find_memorytype_index_f<F: Fn(vk::MemoryPropertyFlags, vk::MemoryProperty
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ExampleBase {
|
pub struct ExampleBase {
|
||||||
pub entry: Entry<V1_0>,
|
pub entry: Entry,
|
||||||
pub instance: Instance<V1_0>,
|
pub instance: Instance,
|
||||||
pub device: Device<V1_0>,
|
pub device: Device,
|
||||||
pub surface_loader: Surface,
|
pub surface_loader: Surface,
|
||||||
pub swapchain_loader: Swapchain,
|
pub swapchain_loader: Swapchain,
|
||||||
pub debug_report_loader: DebugReport,
|
pub debug_report_loader: DebugReport,
|
||||||
|
@ -301,7 +301,7 @@ impl ExampleBase {
|
||||||
pp_enabled_extension_names: extension_names_raw.as_ptr(),
|
pp_enabled_extension_names: extension_names_raw.as_ptr(),
|
||||||
enabled_extension_count: extension_names_raw.len() as u32,
|
enabled_extension_count: extension_names_raw.len() as u32,
|
||||||
};
|
};
|
||||||
let instance: Instance<V1_0> = entry
|
let instance: Instance = entry
|
||||||
.create_instance(&create_info, None)
|
.create_instance(&create_info, None)
|
||||||
.expect("Instance creation error");
|
.expect("Instance creation error");
|
||||||
let debug_info = vk::DebugReportCallbackCreateInfoEXT {
|
let debug_info = vk::DebugReportCallbackCreateInfoEXT {
|
||||||
|
@ -374,7 +374,7 @@ impl ExampleBase {
|
||||||
pp_enabled_extension_names: device_extension_names_raw.as_ptr(),
|
pp_enabled_extension_names: device_extension_names_raw.as_ptr(),
|
||||||
p_enabled_features: &features,
|
p_enabled_features: &features,
|
||||||
};
|
};
|
||||||
let device: Device<V1_0> = instance
|
let device: Device = instance
|
||||||
.create_device(pdevice, &device_create_info, None)
|
.create_device(pdevice, &device_create_info, None)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let present_queue = device.get_device_queue(queue_family_index as u32, 0);
|
let present_queue = device.get_device_queue(queue_family_index as u32, 0);
|
||||||
|
|
Loading…
Reference in a new issue