Skip to content

Commit

Permalink
Allow incorrect glutin config depth == total bits (#8)
Browse files Browse the repository at this point in the history
* Allow incorrect glutin config depth

* Update changelog
  • Loading branch information
alexheretic authored Dec 23, 2023
1 parent 1df9c97 commit 2b32260
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.

Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ impl<T> 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 {
Expand Down

0 comments on commit 2b32260

Please sign in to comment.