this post was submitted on 06 Oct 2023
0 points (50.0% liked)

C++

1993 readers
6 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS
 

I was using this OpenGL tutorial, and when i compile the program and execute it, it fails with the error "Failed to create context: Arguments are inconsistent" the code: https://pastebin.com/1hQJYHxe Im using Arch Linux with sway (Wayland) glxinfo output: https://pastebin.com/VXWtib2W

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 2 years ago (8 children)

It seems to have something to do with context creation, not the window, first thing I'd try to do is use a lower opengl version when creating the window and see if that works, Wayland uses EGL as far as I know, so the base compatibility will potentially be different? The error message isn't very useful either, as it's a one liner, it also could potentially be a GLFW bug itself too...

[–] [email protected] 1 points 2 years ago (6 children)

It also throws an error code: 65543, i didnt add it because i thought it was an error in my code that i wasnt able to see, im sorry, anyway, do you need more info about my system?

[–] [email protected] 2 points 2 years ago* (last edited 2 years ago) (1 children)

Try doing what e0qdk suggests in this comment as it seems to be an issue with how GLFW creates windows in wayland. You're technically creating an eGL window through it and the profile version is different (egl2 is opengl4.x compatible while egl1 is opengl 3.x compatible I think?), so just remove the window calls to glfwWindowHint and see what version it tries to use by default

[–] [email protected] 1 points 2 years ago

i commented all the calls to glfwWindowHint, and now it just exits inmediately with code 0, so i think it is working, although it doesnt create any window either, there is a way to see which version is using by default?

load more comments (4 replies)
load more comments (5 replies)