Split vulkan resources
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s
This commit is contained in:
parent
b977f446d3
commit
f585ba78e7
9 changed files with 483 additions and 244 deletions
|
@ -1,6 +1,7 @@
|
|||
use bevy_app::App;
|
||||
use engine_vulkan::VulkanPlugin;
|
||||
use engine_vulkan::{VulkanConfig, VulkanPlugin};
|
||||
use engine_window::{WindowPlugin, config::WindowConfig};
|
||||
use vulkano::device::{DeviceExtensions, DeviceFeatures};
|
||||
|
||||
pub fn init(app: &mut App) {
|
||||
let window_config = WindowConfig {
|
||||
|
@ -9,7 +10,27 @@ pub fn init(app: &mut App) {
|
|||
height: 600,
|
||||
};
|
||||
|
||||
app.add_plugins((WindowPlugin { window_config }, VulkanPlugin));
|
||||
let device_extensions = DeviceExtensions {
|
||||
khr_dynamic_rendering: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let device_features = DeviceFeatures {
|
||||
dynamic_rendering: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let vulkan_config = VulkanConfig {
|
||||
instance_layers: vec![String::from("VK_LAYER_KHRONOS_validation")],
|
||||
device_extensions,
|
||||
device_features,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
app.add_plugins((
|
||||
WindowPlugin { window_config },
|
||||
VulkanPlugin { vulkan_config },
|
||||
));
|
||||
// Window::new(app, window_config).unwrap();
|
||||
// Vulkan::new(app).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue