Split crates
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s

This commit is contained in:
Florian RICHER 2025-05-18 13:15:29 +02:00
parent 99be029ff8
commit b977f446d3
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
16 changed files with 84 additions and 110 deletions

View file

@ -0,0 +1,33 @@
use engine_window::raw_handle::WindowWrapper;
use vulkan_context::VulkanContext;
use window_render_context::WindowRenderContext;
use bevy_app::{App, Plugin};
mod utils;
mod vulkan_context;
mod window_render_context;
#[derive(Debug, thiserror::Error)]
pub enum VulkanError {
#[error("Failed to create vulkan context")]
FailedToCreateVulkanContext,
}
pub struct VulkanPlugin;
impl Plugin for VulkanPlugin {
fn build(&self, app: &mut App) {
let vulkan_context = VulkanContext::from(app as &App);
app.world_mut().insert_resource(vulkan_context);
}
fn ready(&self, app: &App) -> bool {
app.world().get_resource::<WindowWrapper>().is_some()
}
fn finish(&self, app: &mut App) {
let window_render_context = WindowRenderContext::from(app as &App);
app.world_mut().insert_resource(window_render_context);
}
}