Unable to create OpenGL context

I just downloaded Defold v1.2.181 on Ubuntu 20.04.2 LTS and tried to build the side-scroller tutorial, but this showed up in the console instead:

INFO:DLIB: Log server started on port 41295
INFO:ENGINE: Target listening with name: my-computers-name - 127.0.1.1 - Linux
INFO:ENGINE: Engine service started on port 46647
INFO:ENGINE: Defold Engine 1.2.181 (ff5b94e)
Unable to create OpenGL context
FATAL:ENGINE: Could not open window (-2).
INFO:CRASH: Using libunwind.a

Is this a bug, or am I missing a dependency?

I don’t recognise this issue. What kind of graphics card and drivers do you have?

You can try software rendering: https://defold.com/manuals/linux/#q-my-opengl-drivers-are-outdated-can-i-still-use-defold

1 Like

What does the command “glxinfo | grep version” return?

2 Likes

I’m using the Intel Q45/Q43 4 Series Chipset Integrated Graphics Controller with the i915 driver by Intel Corporation and Tungsten Graphics, Inc.

The output from glxinfo | grep version is …

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL version string: 2.1 Mesa 20.2.6
OpenGL shading language version string: 1.20
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

Our engine supports OpenGL 3.3 core profile / OpenGL 3.1 compat profile.

Your driver doesn’t seem to support that.
Have you updated to the latest driver?

1 Like

I should have the latest version in the repository. I’ll check to see if there are any backports from more recent versions of Ubuntu, but the software rendering seems to work.

Thanks for pointing me in the right direction.

That’s good. You can at least use Defold now, although it is not an optimal solution to use software rendering.

1 Like

Can you tell what the most recent version of Defold which uses OpenGL 2.1 is? I’ve skimmed through some of the release notes for older versions, but they don’t always get that specific with system requirements.

Try 1.2.179.

1 Like

The links to the editors for the older versions of Defold just point back to the same page the links are on. But, I was able to download an older copy of the editor from the Wayback Machine, and it seems to play well with my version of OpenGL.

1 Like

Hmm, didn’t we fix that @JCash?

You can also find all releases on GitHub:

2 Likes

No, not yet. It’s still on my todo list.