From 867d3cddc88889f227e1b640bd3d31c3877b7a93 Mon Sep 17 00:00:00 2001 From: maik klein Date: Fri, 9 Dec 2016 20:06:50 +0100 Subject: [PATCH] open questions --- README.md | 20 ++++++++++++++++++++ examples/src/main.rs | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d0d1ac7..33c1352 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,26 @@ The triangle example is written from top to bottom without many helper functions ![screenshot](http://i.imgur.com/PQZcL6w.jpg) +## Open questions + +### Unsafe? +Currently ash can be used without any unsafe keyword. I have looked at a few other c wrappers and it seems this is common practice. But Ash is not particular safe and I am thinking of marking every function `unsafe`. + +### Optional extension loading +Currently extensions are loaded like normal vulkan functions. This means some extenstions can be loaded, for example the win32 surface on linux. Accessing a unloaded function currently triggers a `debug_assert`. I am thinking of seperating extensions into their own struct. + +```Rust +impl Device{ + pub fn load_swapchain(&self) -> Result; +} +// Instead of +//let swapchain = device.create_swapchain_khr(&swapchain_create_info).unwrap(); + +let swapchain_ext = device.load_swapchain().unwrap(); +let swapchain = swapchain_ext.create_swapchain_khr(&swapchain_create_info).unwrap(); +``` + + ## Roadmap ### Complete diff --git a/examples/src/main.rs b/examples/src/main.rs index 4f379bd..debdc2b 100644 --- a/examples/src/main.rs +++ b/examples/src/main.rs @@ -1,4 +1,3 @@ -#![feature(conservative_impl_trait)] #![allow(dead_code)] extern crate ash;