Begin add Window Render Context
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 26m40s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 26m40s
This commit is contained in:
parent
e2616a0ef5
commit
a04c769438
5 changed files with 163 additions and 14 deletions
|
@ -1,9 +1,11 @@
|
|||
use context::VulkanContext;
|
||||
use vulkan_context::VulkanContext;
|
||||
use window_render_context::WindowRenderContext;
|
||||
|
||||
use super::app::App;
|
||||
|
||||
mod context;
|
||||
mod utils;
|
||||
mod vulkan_context;
|
||||
mod window_render_context;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum VulkanError {
|
||||
|
@ -16,9 +18,11 @@ pub struct Vulkan;
|
|||
impl Vulkan {
|
||||
pub fn new(app: &mut App) -> Result<(), VulkanError> {
|
||||
let vulkan_context = VulkanContext::from(app as &App);
|
||||
|
||||
app.world_mut().insert_resource(vulkan_context);
|
||||
|
||||
let window_render_context = WindowRenderContext::from(app as &App);
|
||||
app.world_mut().insert_resource(window_render_context);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue