Use vulkano_util instead
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m30s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m30s
This commit is contained in:
parent
f486486be3
commit
a4a6c0c60a
9 changed files with 137 additions and 415 deletions
24
src/main.rs
24
src/main.rs
|
@ -1,14 +1,34 @@
|
|||
use vulkano::device::{DeviceExtensions, DeviceFeatures};
|
||||
use vulkano_util::context::{VulkanoConfig, VulkanoContext};
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
mod render;
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
let device_extensions = DeviceExtensions {
|
||||
khr_swapchain: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let device_features = DeviceFeatures {
|
||||
dynamic_rendering: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let vulkano_config = VulkanoConfig {
|
||||
print_device_name: true,
|
||||
device_extensions,
|
||||
device_features,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let vulkano_context = VulkanoContext::new(vulkano_config);
|
||||
|
||||
let event_loop = EventLoop::new().unwrap();
|
||||
event_loop.set_control_flow(ControlFlow::Poll);
|
||||
|
||||
let vulkan_context = render::vulkan_context::VulkanContext::from(&event_loop);
|
||||
let mut app = render::app::App::from(vulkan_context);
|
||||
let mut app = render::app::App::from(vulkano_context);
|
||||
|
||||
match event_loop.run_app(&mut app) {
|
||||
Ok(_) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue