From 6a6ef1bfecb08c468c51f10ef550649d38efe064 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Fri, 3 May 2024 14:01:05 +0200 Subject: [PATCH] always request gles3 --- kubi/src/rendering.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/kubi/src/rendering.rs b/kubi/src/rendering.rs index 350eea2..7ad278b 100644 --- a/kubi/src/rendering.rs +++ b/kubi/src/rendering.rs @@ -6,13 +6,9 @@ use winit::{ window::{WindowBuilder, Fullscreen, Window}, dpi::PhysicalSize }; -use glium::{Display, Surface, Version, Api}; +use glium::{Display, Surface, Version, Api as GlApiTy}; use glutin::{ - prelude::*, - context::{ContextAttributesBuilder, GlProfile}, - surface::{WindowSurface, SurfaceAttributesBuilder}, - display::GetGlDisplay, - config::ConfigTemplateBuilder + config::{Api, ConfigTemplateBuilder}, context::{ContextAttributesBuilder, GlProfile}, display::GetGlDisplay, prelude::*, surface::{SurfaceAttributesBuilder, WindowSurface} }; use glutin_winit::DisplayBuilder; use glam::{Vec3, UVec2}; @@ -96,6 +92,7 @@ impl Renderer { .with_window_builder(Some(wb)); let config_template_builder = ConfigTemplateBuilder::new() + .with_api(Api::GLES3) .prefer_hardware_accelerated(Some(true)) .with_depth_size(24) .with_multisampling(settings.msaa.unwrap_or_default()); @@ -156,7 +153,7 @@ impl Renderer { if display.is_robust() { log::warn!("OpenGL implementation is not robust") } if display.is_debug() { log::info!("OpenGL context is in debug mode") } - assert!(display.is_glsl_version_supported(&Version(Api::GlEs, 3, 0)), "GLSL ES 3.0 is not supported"); + assert!(display.is_glsl_version_supported(&Version(GlApiTy::GlEs, 3, 0)), "GLSL ES 3.0 is not supported"); Self { window, display } }