fix: get CONTEXT_PROFILE_MASK in invalid version (#5007)

This commit is contained in:
Rubens Brandão authored and GitHub committed 2024-01-06 15:16:29 +00:00
1 parent dd2b985690
commit 0298198ab7
1 file changed
+1 -1
+1 -1
View File
@@ -222,7 +222,7 @@ impl super::Adapter {
let es_ver = full_ver.map_or_else(|| Self::parse_version(&version).ok(), |_| None);
if let Some(full_ver) = full_ver {
let core_profile = (full_ver >= (3, 2)).then_some(unsafe {
let core_profile = (full_ver >= (3, 2)).then(|| unsafe {
gl.get_parameter_i32(glow::CONTEXT_PROFILE_MASK)
& glow::CONTEXT_CORE_PROFILE_BIT as i32
!= 0