One of my side hobbies is learning how to make video games in Godot. I was going through a great tutorial, but I got sidetracked due to the usual life circumstances. Now I have a little more free time again, and I want to get back into learning Godot. One problem that I ran into though, is that my old laptop was giving me openGL errors….

When I launch Godot3, it loads like normal, allows me to download templates and projects, edit them (with a 3D editor) and all the usual functions. Knowing that my old laptop doesn’t support GLES3, I choose GLES2, but, when I tried to launch any program, it would give me a popup saying it couldn’t run.

Specifically, there was a popup stating this:

Your video card driver does not support any of the supported OpenGL versions.
Please update your drivers or if you have a very old or integrated GPU upgrade it.

I thought this was rather strange. I’m using Ubuntu 22.04 LTS, and the repository has Godot version 3.2.3 in it by default. While I do want to upgrade and try out Godot4, this older version is perfect for the online tutorial that I am following, which used Godot3 when it was made.

A quick check of my system revealed:

$ lspci |grep Display
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) (rev 03)

So, my graphics card was an Intel GM965. A quick search to make sure the driver was loaded confirmed that it was properly loaded:

$ lsmod |grep video
video                  73728  2 i915,panasonic_laptop
wmi                    40960  1 video
$ lsmod |grep i915
i915                 3899392  11
drm_buddy              20480  1 i915
ttm                   110592  1 i915
drm_display_helper    212992  1 i915
cec                    94208  2 drm_display_helper,i915
drm_kms_helper        249856  2 drm_display_helper,i915
i2c_algo_bit           16384  1 i915
drm                   700416  15 drm_kms_helper,drm_display_helper,drm_buddy,i915,ttm
video                  73728  2 i915,panasonic_laptop

Which I confirmed online was the appropriate driver. Checking with glxinfo also shows that OpenGL version is 2.1, and OpenGL ES is 2.0:

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) 965GM (CL)
OpenGL version string: 2.1 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:

So if my information is correct, my laptop supports GLES 2.0, but for some reason Godot3 was not working, reporting that no version of OpenGL was available on my system. Not taking this at face value, I decided to run Godot from the terminal and see what the stdout says, which was quite a bit, but here is the relevant part:

Godot Engine v3.2.3.stable.custom_build -
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  31
  Current serial number in output stream:  31
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  31
  Current serial number in output stream:  31
ERROR: initialize: Condition "ctxErrorOccurred || !p->glx_context" is true. Returned: ERR_UNCONFIGURED
   At: platform/x11/context_gl_x11.cpp:190.
ERROR: is_viable: Error initializing GLAD
   At: drivers/gles3/rasterizer_gles3.cpp:141.

So despite being OpenGL 2.0 on my machine, and despite Godot allowing GLES 2.0 to be used, it was giving the error because it could not find GLES 3.0! Interesting. With this knowledge, I decided to try a different approach. I made a new project, choosing GLES 2.0 for the project, and then created a small 3D world with one camera and one cube. It launched flawlessly.

Odd. This is when I came to the realization that choosing GLES 2.0 or GLES 3.0 from the top right runtime menu really doesn’t do anything. Loading a project and choosing GLES 2.0 doesn’t make that project a 2.0 project if it was built using GLES 3.0. I found several demo projects that were older, written in GLES 2.0 which worked perfectly. However, if the project was built originally choosing GLES 3.0, it will only run as GLES 3.0, despite you choosing to build and run it as GLES 2.0 from the runtime menu.

I also found that every project has a setting for GLES 2/3 in:

Project -> Project Settings -> Rendering -> Quality

Driver name -> GLES3 or GLES2
Fallback to GLES2 yes/no

And if you use a GLES 3.0 project, and change it to GLES 2.0, with/or a fallback to GLES 2, it will no longer give the error for not finding GLES 3 in the terminal, and it will not give the popup for wrong or missing OpenGL, however, under all the test projects I tried, they would all crash immediately.

The only logical conclusion that I can come to is that when a project is created, you have to choose GLES 2 or 3, and your choice will ultimately make that project permanently a 2 or 3, regardless of which runtime renderer is chosen while developing.

An example project that was built with GLES 2.0 is “Github Cube Characters” found under the community templates. It will run flawlessly, because it was a 3D project built from the ground up on GLES 2.0. An example project built with GLES 3 that will only work with GLES 3 is the “Kinematic Character 3D” project which is also found under the community templates.

In the end, I simply learned that choosing GLES 2 or 3 from the runtime menu was irrelevant. The project has to be built as a GLES 2.0 project to work on my old machine. Which, for the purposes of my tutorial will not make much difference.

Linux – keep it simple.

P.S. As an interesting side note, the Intel GM965 when used with Windows only supports OpenGL version 1.5, but under Linux can support 2.0, which I find very odd.

Leave a Reply

Your email address will not be published. Required fields are marked *