From 2b3226017301f66396607ec01fe99b54ebc111cd Mon Sep 17 00:00:00 2001 From: Alex Butler Date: Sat, 23 Dec 2023 08:50:57 +0000 Subject: [PATCH] Allow incorrect glutin config depth == total bits (#8) * Allow incorrect glutin config depth * Update changelog --- CHANGELOG.md | 4 ++++ src/lib.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97f606f..0f44042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +* Allow incorrect OS config depth_size = expected depth_size+stencil_size. + This works around an issue with macos software rendering. + # v0.32.0 * Update _winit_ to `0.29`, _glutin-winit_ to `0.4`, _glutin_ to `0.31`. diff --git a/src/lib.rs b/src/lib.rs index ba37980..340c57c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -165,7 +165,9 @@ impl Builder<'_, T> { (!srgb || c.srgb_capable()) && color_bits == color_total_bits - alpha_bits && c.alpha_size() == alpha_bits - && c.depth_size() == depth_total_bits - stencil_bits + && (c.depth_size() == depth_total_bits - stencil_bits + // workaround to allow depth_size=32 & stencil_size=8 on macos software renderer + || c.depth_size() == depth_total_bits) && c.stencil_size() == stencil_bits })); match best {