libgdx/libgdx · critical · GdxRuntimeException

OpenGL is not supported by the video driver.

Error message

OpenGL is not supported by the video driver.

What it means

Thrown during display pixel-format setup after all attempts to create the OpenGL context failed: the initial Display.create (with GL30/ES profile attributes if requested), simpler retries, and finally a plain new PixelFormat() all raised exceptions. If allowSoftwareMode is set it first retries with software OpenGL; only when that path is exhausted does it report that the video driver provides no usable OpenGL.

Source

Thrown at backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGraphics.java:415

					bufferFormat = new BufferFormat(8, 8, 8, 8, 16, 8, 0, false);
				}
			} catch (Exception ex2) {
				Display.destroy();
				try {
					Thread.sleep(200);
				} catch (InterruptedException ignored) {
				}
				try {
					Display.create(new PixelFormat());
				} catch (Exception ex3) {
					Display.destroy();
					if (!softwareMode && config.allowSoftwareMode) {
						softwareMode = true;
						System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");
						createDisplayPixelFormat(useGL30, gles30ContextMajor, gles30ContextMinor);
						return;
					}
					throw new GdxRuntimeException("OpenGL is not supported by the video driver.", ex3);
				}
				if (getDisplayMode().bitsPerPixel == 16) {
					bufferFormat = new BufferFormat(5, 6, 5, 0, 8, 0, 0, false);
				}
				if (getDisplayMode().bitsPerPixel == 24) {
					bufferFormat = new BufferFormat(8, 8, 8, 0, 8, 0, 0, false);
				}
				if (getDisplayMode().bitsPerPixel == 32) {
					bufferFormat = new BufferFormat(8, 8, 8, 8, 8, 0, 0, false);
				}
			}
		}
	}

	public void initiateGLInstances () {
		if (usingGL30) {
			gl30 = new LwjglGL30();
			gl20 = gl30;

View on GitHub (pinned to 97f4086187)

Solutions

  1. Update/install proper GPU drivers (or enable 3D acceleration in the VM settings)
  2. Set config.allowSoftwareMode = true in LwjglApplicationConfiguration to fall back to software OpenGL (e.g. Mesa llvmpipe, Windows GDI)
  3. Avoid launching the game over remote desktop, or use a local session
  4. If requesting GLES30 context attributes, drop them (useGL30 false / lower gles30ContextMajor/Minor) since the driver may reject the profile

Example fix

// before
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
// allowSoftwareMode defaults to false

// after
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.allowSoftwareMode = true; // permits software OpenGL fallback
Defensive patterns

Strategy: fallback

Validate before calling

// no reliable pre-check from Java; approximate with a capability probe
import org.lwjgl.opengl.GLContext;
// best available guard: set allowSoftwareMode and verify a context can be created at startup on a test machine

Try / catch

try {
    new LwjglApplication(game, config);
} catch (GdxRuntimeException e) {
    if (e.getMessage() != null && e.getMessage().contains("OpenGL is not supported")) {
        showDriverHelpDialog(); // instruct user to install GPU drivers
    }
}

Prevention

When it happens

Trigger: Display.create() failing repeatedly: missing/broken GPU drivers, a remote desktop session without GL, a VM with no 3D acceleration, or macOS forcing an incompatible profile. The constructor chain createDisplayPixelFormat catches earlier exceptions and ends at this final plain Display.create attempt.

Common situations: Running on a fresh OS install with no GPU drivers; RDP/VNC sessions; VirtualBox/VMware without 3D acceleration enabled; old Intel integrated chips lacking GL 2.0.

Related errors


AI-assisted analysis of libgdx/libgdx@97f4086187 (2026-08-14). Data as JSON: /api/errors/d33dd80d4e1a24a4. Report an issue: GitHub.