|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
use ash::version::{EntryV1_0, InstanceV1_0};
|
|
|
|
|
use ash::vk;
|
|
|
|
|
use ash::{vk, Entry, Instance};
|
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
use ash::extensions::khr::Win32Surface;
|
|
|
|
@ -51,9 +50,9 @@ pub fn required_extension_names() -> Vec<*const i8> {
|
|
|
|
|
|
|
|
|
|
// create surface ---------------------------------------------------------
|
|
|
|
|
#[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))]
|
|
|
|
|
pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
|
|
|
|
|
entry: &E,
|
|
|
|
|
instance: &I,
|
|
|
|
|
pub unsafe fn create_surface(
|
|
|
|
|
entry: &Entry,
|
|
|
|
|
instance: &Instance,
|
|
|
|
|
window: &winit::window::Window,
|
|
|
|
|
) -> Result<vk::SurfaceKHR, vk::Result> {
|
|
|
|
|
use std::ptr;
|
|
|
|
@ -73,9 +72,9 @@ pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
|
pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
|
|
|
|
|
entry: &E,
|
|
|
|
|
instance: &I,
|
|
|
|
|
pub unsafe fn create_surface(
|
|
|
|
|
entry: &Entry,
|
|
|
|
|
instance: &Instance,
|
|
|
|
|
window: &winit::window::Window,
|
|
|
|
|
) -> Result<vk::SurfaceKHR, vk::Result> {
|
|
|
|
|
use std::mem;
|
|
|
|
@ -109,9 +108,9 @@ pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
|
pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
|
|
|
|
|
entry: &E,
|
|
|
|
|
instance: &I,
|
|
|
|
|
pub unsafe fn create_surface(
|
|
|
|
|
entry: &Entry,
|
|
|
|
|
instance: &Instance,
|
|
|
|
|
window: &winit::window::Window,
|
|
|
|
|
) -> Result<vk::SurfaceKHR, vk::Result> {
|
|
|
|
|
use std::os::raw::c_void;
|
|
|
|
|