Crate vulkan_rs [−] [src]
Vulkan bindings for the rust programming language.
Usage
extern crate vulkan_rs; use vulkan_rs::prelude::vk_version_1_0::*; use std::ffi::CString; fn main() { let app_aame = CString::new("Application name").unwrap(); let app_info = VkApplicationInfo { sType: VK_STRUCTURE_TYPE_APPLICATION_INFO, pNext: vk_null(), pApplicationName: app_aame.as_ptr(), applicationVersion: VkVersion::new(1,0,0).into(), pEngineName: app_aame.as_ptr(), engineVersion: VkVersion::new(1,0,0).into(), apiVersion: VK_API_VERSION_1_0.into(), }; let create_info = VkInstanceCreateInfo { sType: VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, pNext: vk_null(), flags: VkFlags::NONE, pApplicationInfo: &app_info, enabledLayerCount: 0, ppEnabledLayerNames: vk_null(), enabledExtensionCount: 0, ppEnabledExtensionNames: vk_null(), }; let instance = vkCreateInstance(&create_info, None).unwrap(); println!("created instance {:?}", instance); // ... vkDestroyInstance(instance, None); }
Modules
cmds | |
platform |
Types used by the window-system-interface. |
prelude | |
util |
utilities |