-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLES2: Check for GPU capabilities to display an error #5909
GLES2: Check for GPU capabilities to display an error #5909
Conversation
The engine will still segfault, but the error message should be displayed by the OS in a blocking manner, so that it will only crash once users have acknowledged the error dialog. Closes godotengine#1162.
I pushed a test build of this commit on our CI-based deployment system: https://github.com/GodotBuilder/godot-builds/releases/tag/test_20160725 |
to test under linux without changing the code and recompiling, i think you can set the environment variable MESA_GL_VERSION_OVERRIDE to 2.0 : http://www.mesa3d.org/envvars.html IIRC, that's also how to proceeded to force MESA to allow black listed GPU to work with Godot. |
Nice trick, that works for me :) |
Note that only desktop platforms use GLEW, so this error should not show on Android and iOS devices. |
So I tested on my Acer eMachine Netbook with Intel Atom N450 and integrated Intel GMA 3150 : under LinuxMint18, MATE, 32bits (MESA Opengl 1.4) :
same netbook, under Windows 10, 32bits (
I also tested on my regular laptop with radeon R4 and Windows 8.1 and it worked correctly. |
Okay, i've found why the dialog box was not displayed into Windows 10 before crashing. Into
|
Nice catch @SuperUserNameMan. Here's the corresponding API reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx Does the message box then appear in the foreground, or in the background? I see that there is a |
It appears on foreground. |
This flag pauses the current running thread, allowing for the user to see the alert and acknowledge it before the thread continues (and e.g. crashes :)). Thanks to @SuperUserNameMan for finding it. Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
Pushed a new commit adding this flag, thanks again :) |
The engine will still segfault, but the error message should be displayed by the
OS in a blocking manner, so that it will only crash once users have acknowledged
the error dialog.
Please test, especially if you have hardware that does not support GL 2.1 / GLES 2.0. I only tested on Linux X11, and by tweaking the
if
to make it fail when GL 2.1 was actually supported. @SuperUserNameMan's test in #1162 (comment) seems to indicate that it would be working on Windows for his hardware.Closes #1162.