diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-08-02 19:11:47 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-08-02 19:11:47 -0300 |
commit | 3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49 (patch) | |
tree | aa2c814b744ab970ae79931b419908ff7ebc850e /drivers | |
parent | ad313097ebcb2a0c02c956fdf74a6610c3f7c9a8 (diff) | |
parent | cea949180688add09eb9e69f5e405f361dc96d40 (diff) |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 4cd97a7f6a..ba93a26a2d 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -10788,8 +10788,17 @@ void RasterizerGLES2::init() { if (OS::get_singleton()->is_stdout_verbose()) { print_line(String("GLES2: Using GLEW ") + (const char*) glewGetString(GLEW_VERSION)); } -#endif + // Check for GL 2.1 compatibility, if not bail out + if (!glewIsSupported("GL_VERSION_2_1")) { + ERR_PRINT("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n" + "Try a drivers update, buy a new GPU or try software rendering on Linux; Godot will now crash with a segmentation fault."); + OS::get_singleton()->alert("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n" + "Godot Engine will self-destruct as soon as you acknowledge this error message.", + "Fatal error: Insufficient OpenGL / GLES drivers"); + // TODO: If it's even possible, we should stop the execution without segfault and memory leaks :) + } +#endif |