erupt-bootstrap

docs.rs crates.io

Vulkan Bootstrapping library for Rust, inspired by [vk-bootstrap].

Cargo Features

Example

```rust let entry = 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 = QueueFamilyRequirements::graphicspresent(); let transfer = QueueFamilyRequirements::preferablyseparatetransfer();

let device_features = vk::PhysicalDeviceFeatures2Builder::new() .features(vk::PhysicalDeviceFeaturesBuilder::new().build());

let devicebuilder = DeviceBuilder::new() .requirequeuefamily(graphicspresent) .requirequeuefamily(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(); ```

Licensing

This project is licensed under the [zlib License].

vk-bootstrap, the inspiration of this project, is licensed under the [MIT license].