mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
ensure server has GLX_ARB_create_context extension
This commit is contained in:
parent
dcd5c49b7f
commit
f83e783b26
|
@ -260,7 +260,7 @@ fn create_context(glx: &ffi::glx::Glx, extra_functions: &ffi::glx_extra::Glx, ex
|
||||||
-> Result<ffi::GLXContext, CreationError>
|
-> Result<ffi::GLXContext, CreationError>
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let context = if extra_functions.CreateContextAttribsARB.is_loaded() {
|
let context = if extensions.split(' ').find(|&i| i == "GLX_ARB_create_context").is_some() {
|
||||||
let mut attributes = Vec::with_capacity(9);
|
let mut attributes = Vec::with_capacity(9);
|
||||||
|
|
||||||
attributes.push(ffi::glx_extra::CONTEXT_MAJOR_VERSION_ARB as libc::c_int);
|
attributes.push(ffi::glx_extra::CONTEXT_MAJOR_VERSION_ARB as libc::c_int);
|
||||||
|
|
Loading…
Reference in a new issue