Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWindowError(SdlError("Could not create GL context")) #194
Comments
This comment has been minimized.
This comment has been minimized.
TatriX
commented
Oct 19, 2017
|
Try |
This comment has been minimized.
This comment has been minimized.
|
OpenGL version string: 3.0 Mesa 17.2.2 |
This comment has been minimized.
This comment has been minimized.
|
I’m not familiar with exactly which Linux drivers you should be using with that processor or if they actually exist yet (kernel 4.13 is relatively up to date I believe but there may be something new since then), but that processor supports up to GL 4.4, so the fact that it’s only using 3.0 isn’t good (and the cause of the crash, we only support > 3.2 at this point).
… On Oct 19, 2017, at 3:00 PM, Emile ***@***.***> wrote:
OpenGL version string: 3.0 Mesa 17.2.2
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#194 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA2Ln4s01R7Uxda9eclk50Df8qV2D6nbks5st8aKgaJpZM4P_yls>.
|
This comment has been minimized.
This comment has been minimized.
TatriX
commented
Oct 19, 2017
|
This comment has been minimized.
This comment has been minimized.
TatriX
commented
Oct 19, 2017
•
|
I just realized that to make it work on Android it should work with 2.0... |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the help, This is definitely a problem on my end so this issue should probably be closed. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, ggez targets OpenGL 3.2 by default. Work is (slowly) happening to make it possible to support other OpenGL versions, follow #143 if you are interested. An Intel HD Graphics 620 GPU should be able to do much better than OpenGL 3.0, my laptop has the previous generation chip (HD Graphics 530) and supports OpenGL 4.5. It sounds like you might be using the Mesa software renderer; it can be hard to tell since the Intel driver also ties into the Mesa framework. |
icefoxen
added
question
Type-DOCS
labels
Oct 20, 2017
This comment has been minimized.
This comment has been minimized.
|
This is another common question that needs to be documented somewhere well; we need an FAQ or such. |
icefoxen
added
the
bug
label
Oct 20, 2017
icefoxen
added this to the 0.4 milestone
Oct 23, 2017
This comment has been minimized.
This comment has been minimized.
rassouly
commented
Nov 1, 2017
|
I have the exact same problem but I don't believe @FuzzyLitchi 's problem come from lack of openGL 3.3 support. Indeed my
The line that indicates the opengl version is Moreover the following code runs fine: extern crate sdl2;
use sdl2::video::GLProfile;
fn main() {
let sdl_context = sdl2::init().unwrap();
let video_subsystem = sdl_context.video().unwrap();
let gl_attr = video_subsystem.gl_attr();
gl_attr.set_context_profile(GLProfile::Core);
gl_attr.set_context_version(3, 3);
let window = video_subsystem.window("Window", 800, 600)
.opengl()
.build()
.unwrap();
let _ctx = window.gl_create_context().unwrap();
debug_assert_eq!(gl_attr.context_profile(), GLProfile::Core);
debug_assert_eq!(gl_attr.context_version(), (3, 3));
}with the 0.29.1 version of the sdl2 crate. |
This comment has been minimized.
This comment has been minimized.
|
@Biohazard50 That's very interesting, thank you. i have a similar OpenGL version string from glxinfo to you, but can't cause this problem to manifest on my system despite having almost the same graphics card (Intel(R) HD Graphics 530). :-/ If someone wants to dig more into where the ggez setup code causes this error, the exact code in question (for 0.3.3) is at https://github.com/ggez/ggez/blob/0.3/src/graphics/mod.rs#L257-L276 There's other various OpenGL flags that might cause a display to say "I can't support that" such as resolution, color depth, etc, and it always seems a bit more fiddly to mess with than you think it should be. If you can find out where exactly it's going wrong that would be useful information to have! Do you have a hidpi display? Multiple monitors? Does it work if you fiddle with vsync? Stuff like that. |
This comment has been minimized.
This comment has been minimized.
rassouly
commented
Nov 1, 2017
•
|
I think I found something: adding this line I am going to run gdb to check. |
This comment has been minimized.
This comment has been minimized.
|
Great hunting! Thank you so much. This kind of isn't a trivial patch because to my knowledge the RenderFormat should be Srgba8 and changing it will screw with the color balance of basically every image ever. I find it very strange that your hardware apparently doesn't like it. Your graphics chipset and driver version appear basically identical to mine, so maybe it's the actual monitor that is having problems? What model of monitor is it? Can you post a full @FuzzyLitchi Does this relate to your original problem at all, or have you managed to fix that? The right solution may be to make SRGB a config flag that can be toggled: https://love2d.org/wiki/love.graphics.isGammaCorrect . However all of gfx-rs's types (framebuffer, texture, shader, etc) are generic on the RenderFormat, so being able to specify it at runtime while making it still convenient to use is a little non-trivial. This is honestly a little related to #143, and the eventual goal of being able to support non-opengl backends (DirectX, Vulkan) which have a similar issue. I am hesitant to just wrap all the genericness up into the |
This comment has been minimized.
This comment has been minimized.
rassouly
commented
Nov 2, 2017
|
I am using a laptop (asus zenbook UX305C) so I don't really know which monitor it is. This is however a fairly recent laptop (2 year old) so this problem might affect many systems. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 2, 2017
|
This sounds very much like a known regression of the intel i965 MESA driver from the 17.1 branch to the 17.2 branch. See my comment for the piston engine for more: PistonDevelopers/piston#1202 (comment) For the users I suggest to obtain MESA 17.1 (e.g. by compiling it yourself). For the maintainers of ggez I suggest to add a non-srgb mode to work on intel hardware on MESA 17.2. Don't please ping the MESA developers, they are already aware of the bug! |
This comment has been minimized.
This comment has been minimized.
rassouly
commented
Nov 2, 2017
|
I can confirm that downgrading mesa fixes all my problems. |
This comment has been minimized.
This comment has been minimized.
|
Downgrading to mesa 17.1 fixed it for me too, thanks :) |
This comment has been minimized.
This comment has been minimized.
rassouly
commented
Nov 12, 2017
|
This bug is fixed for me (and for everyone I hope) in Mesa master. So this issue should be closed. |
This comment has been minimized.
This comment has been minimized.
|
17.1.8-2 -> 17.2.5-1 EDIT: Oh, master |
est31
referenced this issue
Nov 14, 2017
Closed
Couldn't find any pixel format that matched the criterias. #1202
This comment has been minimized.
This comment has been minimized.
|
Ok, closing this since it seems resolved. |
icefoxen
closed this
Nov 25, 2017
termhn
referenced this issue
Nov 28, 2017
Closed
Not usable on Linux with modern Intel graphics #212
This comment has been minimized.
This comment has been minimized.
|
Perhaps we should keep this open until the fix is implemented in a standard Mesa update that would be rolled out to common distros to prevent more confusion like #212? |
This comment has been minimized.
This comment has been minimized.
|
You are optimistic about whether people check the issue tracker before posting things! But, can't hurt. |
icefoxen
reopened this
Nov 29, 2017
icefoxen
added
the
driver bug
label
Dec 6, 2017
This comment has been minimized.
This comment has been minimized.
daboross
commented
Jan 30, 2018
|
@cider-teeworlds you, uh, don't have to be so dramatic. "Work in progress game engine has bugs." |
This comment has been minimized.
This comment has been minimized.
|
People work on this with whatever spare time they can afford. While we would all love a perfectly functional library today, we are still laborers of time and effort. If you spent either of those to read this thread you would see that it's an issue in the mesa library. There are options listed in this thread that you can follow to get around that. |
This comment has been minimized.
This comment has been minimized.
|
@cider-teeworlds If I started a patreon with the promise that I would work on making ggez support older hardware if people donated, would you donate? :-D |
This comment has been minimized.
This comment has been minimized.
ibrokemypie
commented
Feb 8, 2018
|
I believe I am getting the same error when running astroblasto
|
This comment has been minimized.
This comment has been minimized.
|
@ibrokemypie Yeah, looks like it. So that confirms that Mesa 17.3 has this issue as well... :-( |
This comment has been minimized.
This comment has been minimized.
|
Been a few weeks, but i think i remember 17.4 being the target release for this change. They have a pretty robust version pipeline to go through to ensure they don't break everything for everyone. |
This comment has been minimized.
This comment has been minimized.
I appreciate that, and sympathize with them, but the inevitable first thought is "well it didn't bloody work now did it". :-P |
This comment has been minimized.
This comment has been minimized.
|
PistonDevelopers/piston#1202 (comment)
|
ggez
deleted a comment
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
|
@cider-teeworlds if you do not stop your harassment, I will block you from the project. You are also risking your GitHub account when you write stuff like that so think about that. |
ggez
deleted a comment
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
|
I'm sort of catching up here - revived a project last night and ran into this as soon as I tried to cargo update and rebuild. I'm wondering if there's some guidance on configuring the target gl version so things will run, even when on the busted mesa. I see https://github.com/ggez/ggez/blob/master/src/graphics/mod.rs#L227, which I'm planning to add as a binary target in my project. Perhaps this would be nice to have as a separate standalone crate? |
This comment has been minimized.
This comment has been minimized.
NoraCodes
commented
Feb 14, 2018
|
I also ran into this issue. It would be great to have a way in In any case, many thanks for all the help on this project. |
This comment has been minimized.
This comment has been minimized.
|
Unfortunately OGL isn’t really backwards compatible. It’s not as simple as saying "don’t need the new stuff, just let me do basics," we’d need to rewrite shaders and maybe a fair amount of the render pipeline itself because it depends fairly heavily on instanced drawing support which doesn’t exist until close to the version we already use without extensions.
… On Feb 14, 2018, at 3:46 PM, Leo Tindall ***@***.***> wrote:
I also ran into this issue. It would be great to have a way in conf to specify that an advanced graphics mode isn't needed; my current project just needs to draw pixels, rectangles, and text on the screen, and it would be great to be able to signal that to GGEZ so I can fall back to basics in terms of OpenGL.
In any case, many thanks for all the help on this project.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#194 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA2Ln4zk00g3h0V2BIF_eWFj3pbKe8o_ks5tU2IvgaJpZM4P_yls>.
|
This comment has been minimized.
This comment has been minimized.
NoraCodes
commented
Feb 14, 2018
|
That makes sense; sorry for the ignorant comment. In happier news, I can confirm that the fix is present in Mesa 18, at least for me. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Feb 14, 2018
|
This specific bug has little to do with the provided OpenGL version but rather with sRGB support. That's it. |
This comment has been minimized.
This comment has been minimized.
bestouff
commented
Mar 8, 2018
•
|
How about modifying that "conf" setting on linux to have at least the examples work ? There are countless applications working with mesa 17.x, the fact that ggez doesn't is a bit weird. |
This comment has been minimized.
This comment has been minimized.
Long story short, it's not currently designed to be modified, hardcoding a different value would be Incorrect, and I'm not yet sure how to redesign it to be easily modified. You're right though, this is a setting that should be able to be toggled. #299 has been created. |
This comment has been minimized.
This comment has been minimized.
|
Another one solution for Arch/Manjaro user's:
sudo vim /etc/pacman.conf
# ...
[mesa-git]
SigLevel = Optional
Server = https://pkgbuild.com/~lcarlier/$repo/$arch
glxinfo | grep "OpenGL version" # or glxinfo | grep -i opengl
# ...
OpenGL version string: 3.0 Mesa 18.1.0-devel (git-e1b2e5667c) |
This comment has been minimized.
This comment has been minimized.
est31
commented
Mar 28, 2018
|
FINALLY we got mesa 18.0 which should include a fix for this bug. Looking forward to mesa 18.0 hitting all the distros, then this issue should be history. |
This comment has been minimized.
This comment has been minimized.
bestouff
commented
Mar 28, 2018
|
This may take a loong time, especially for people using LTS versions which can last a few years. |
cjritola
referenced this issue
Apr 7, 2018
Closed
Fails to run on Intel HD 620 graphics in linux #242
icefoxen
added this to the 0.5 milestone
May 2, 2018
This comment has been minimized.
This comment has been minimized.
C-Bouthoorn
commented
May 2, 2018
|
This seems to have been fixed with the latest |
This comment has been minimized.
This comment has been minimized.
|
A lot of the innards have been reworked in commit 8356184 and the few previous ones. It might still take some rearranging, and it will definitely involve an API break. What we probably have to do is either make |
FuzzyLitchi commentedOct 19, 2017
•
edited
I compiled this code (the example from the website),
and it compiles fine, but when I try to run it, I get the following error:
I have tried a bunch of different examples and nothing seems to run. This seems to be related to #143 but I'm running on a pretty new machine, specs bellow.