diff --git a/kubi/src/main.rs b/kubi/src/main.rs index d0aeb98..0d4294f 100644 --- a/kubi/src/main.rs +++ b/kubi/src/main.rs @@ -57,7 +57,6 @@ use rendering::{ RenderTarget, BackgroundColor, clear_background, - assert_renderer, primitives::init_primitives, selection_box::render_selection_box, world::draw_world, @@ -73,7 +72,6 @@ use gui::{render_gui, init_gui, gui_testing, update_gui}; fn startup() -> Workload { ( - assert_renderer, initial_resize_event, load_settings, load_prefabs, diff --git a/kubi/src/rendering.rs b/kubi/src/rendering.rs index e6d740c..1e234da 100644 --- a/kubi/src/rendering.rs +++ b/kubi/src/rendering.rs @@ -1,4 +1,4 @@ -use shipyard::{Unique, NonSendSync, UniqueView, UniqueViewMut}; +use shipyard::{Unique, NonSendSync, UniqueView, UniqueViewMut, AllStoragesView}; use glium::{ Display, Surface, Version, Api, @@ -35,18 +35,14 @@ impl Renderer { .with_gl_profile(GlProfile::Core); let display = Display::new(wb, cb, event_loop) .expect("Failed to create a glium Display"); - log::info!("renderer: {}", display.get_opengl_renderer_string()); - log::info!("oepngl {}", display.get_opengl_version_string()); + log::info!("Renderer: {}", display.get_opengl_renderer_string()); + log::info!("OpenGL {}", display.get_opengl_version_string()); + log::info!("Supports GLES {:?}", display.get_supported_glsl_version()); + assert!(display.is_glsl_version_supported(&Version(Api::GlEs, 3, 0)), "GLES 3.0 is not supported"); Self { display } } } -pub fn assert_renderer( - renderer: NonSendSync> -) { - assert!(renderer.display.is_glsl_version_supported(&Version(Api::GlEs, 3, 0)), "GLES 3.0 is not supported"); -} - pub fn clear_background( mut target: NonSendSync>, color: UniqueView,