mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 08:18:43 -06:00
fix missing depth buffer (like wtf)
This commit is contained in:
parent
d848f60301
commit
198dfb088e
|
@ -12,7 +12,9 @@ use glutin::{
|
|||
context::ContextAttributesBuilder,
|
||||
surface::{WindowSurface, SurfaceAttributesBuilder},
|
||||
display::GetGlDisplay,
|
||||
config::ConfigTemplateBuilder
|
||||
};
|
||||
use glutin_winit::DisplayBuilder;
|
||||
use glam::{Vec3, UVec2};
|
||||
use crate::{events::WindowResizedEvent, settings::{GameSettings, FullscreenMode}};
|
||||
|
||||
|
@ -90,8 +92,12 @@ impl Renderer {
|
|||
});
|
||||
|
||||
// First we start by opening a new Window
|
||||
let display_builder = glutin_winit::DisplayBuilder::new().with_window_builder(Some(wb));
|
||||
let config_template_builder = glutin::config::ConfigTemplateBuilder::new();
|
||||
let display_builder = DisplayBuilder::new().with_window_builder(Some(wb));
|
||||
let config_template_builder = ConfigTemplateBuilder::new()
|
||||
.prefer_hardware_accelerated(Some(true))
|
||||
.with_depth_size(24)
|
||||
.with_multisampling(settings.msaa.unwrap_or_default())
|
||||
.with_transparency(false);
|
||||
let (window, gl_config) = display_builder
|
||||
.build(event_loop, config_template_builder, |mut configs| {
|
||||
configs.next().unwrap()
|
||||
|
|
|
@ -13,7 +13,7 @@ pub struct FullscreenSettings {
|
|||
pub struct GameSettings {
|
||||
pub vsync: bool,
|
||||
pub fullscreen: Option<FullscreenSettings>,
|
||||
pub msaa: Option<u16>,
|
||||
pub msaa: Option<u8>,
|
||||
pub max_anisotropy: Option<u16>,
|
||||
/// there's a 1 chunk border of loaded but invisible around this
|
||||
pub render_distance: u8,
|
||||
|
|
Loading…
Reference in a new issue