Vulkan Bootstrapping library for Rust, inspired by [vk-bootstrap
].
surface
(enabled by default): Enables the use of [raw-window-handle
].```rust let entry = erupt::EntryLoader::new().unwrap(); let instancebuilder = InstanceBuilder::new() .validationlayers(ValidationLayers::Request) .requestdebugmessenger(DebugMessenger::Default) .requiresurfaceextensions(&window) .unwrap(); let (instance, debugmessenger, instancemetadata) = unsafe { instance_builder.build(&entry) }.unwrap();
let surface = unsafe { erupt::utils::surface::create_surface(&instance, &window, None) }.unwrap();
let graphicspresent = QueueFamilyCriteria::graphicspresent(); let transfer = QueueFamilyCriteria::preferablyseparatetransfer();
let device_features = vk::PhysicalDeviceFeatures2Builder::new() .features(vk::PhysicalDeviceFeaturesBuilder::new().build());
let devicebuilder = DeviceBuilder::new() .queuefamily(graphicspresent) .queuefamily(transfer) .requirefeatures(&devicefeatures) .forsurface(surface); let (device, devicemetadata) = unsafe { devicebuilder.build(&instance, &instancemetadata) }.unwrap(); let graphicspresent = devicemetadata .devicequeue(&instance, &device, graphicspresent, 0) .unwrap() .unwrap(); let transfer = devicemetadata .devicequeue(&instance, &device, transfer, 0) .unwrap() .unwrap(); ```
For more examples, visit the git repo.
The logo contains the Volcano Emoji of Twemoji (License). The name "erupt" was added on top of the volcano. The boot is the "Hiking Boot" from Openclipart, released into the Public Domain.
This project is licensed under the [zlib License].
vk-bootstrap
, the inspiration of this project, is licensed under the [MIT license].