ash-molten/src/bin/main.rs
Maik Klein 629897604d Init
2019-06-05 10:22:29 +02:00

23 lines
810 B
Rust

use ash::{
version::{EntryV1_0, InstanceV1_0},
vk, vk_make_version,
};
use std::ffi::CString;
fn main() {
unsafe {
let entry = ash_molten::MoltenEntry::load().expect("Unable to load Molten");
let app_name = CString::new("Hello Static Molten").unwrap();
let appinfo = vk::ApplicationInfo::builder()
.application_name(&app_name)
.application_version(0)
.engine_name(&app_name)
.engine_version(0)
.api_version(vk_make_version!(1, 0, 0));
let create_info = vk::InstanceCreateInfo::builder().application_info(&appinfo);
let instance = entry.create_instance(&create_info, None).expect("Instance");
let devices = instance.enumerate_physical_devices();
println!("{:?}", devices);
}
}