{"record":{"id":"d33dd80d4e1a24a4","repo":"libgdx/libgdx","slug":"opengl-is-not-supported-by-the-video-driver","errorCode":null,"errorMessage":"OpenGL is not supported by the video driver.","messagePattern":"OpenGL is not supported by the video driver\\.","errorType":"exception","errorClass":"GdxRuntimeException","httpStatus":null,"severity":"critical","filePath":"backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGraphics.java","lineNumber":415,"sourceCode":"\t\t\t\t\tbufferFormat = new BufferFormat(8, 8, 8, 8, 16, 8, 0, false);\n\t\t\t\t}\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tDisplay.destroy();\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (InterruptedException ignored) {\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tDisplay.create(new PixelFormat());\n\t\t\t\t} catch (Exception ex3) {\n\t\t\t\t\tDisplay.destroy();\n\t\t\t\t\tif (!softwareMode && config.allowSoftwareMode) {\n\t\t\t\t\t\tsoftwareMode = true;\n\t\t\t\t\t\tSystem.setProperty(\"org.lwjgl.opengl.Display.allowSoftwareOpenGL\", \"true\");\n\t\t\t\t\t\tcreateDisplayPixelFormat(useGL30, gles30ContextMajor, gles30ContextMinor);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthrow new GdxRuntimeException(\"OpenGL is not supported by the video driver.\", ex3);\n\t\t\t\t}\n\t\t\t\tif (getDisplayMode().bitsPerPixel == 16) {\n\t\t\t\t\tbufferFormat = new BufferFormat(5, 6, 5, 0, 8, 0, 0, false);\n\t\t\t\t}\n\t\t\t\tif (getDisplayMode().bitsPerPixel == 24) {\n\t\t\t\t\tbufferFormat = new BufferFormat(8, 8, 8, 0, 8, 0, 0, false);\n\t\t\t\t}\n\t\t\t\tif (getDisplayMode().bitsPerPixel == 32) {\n\t\t\t\t\tbufferFormat = new BufferFormat(8, 8, 8, 8, 8, 0, 0, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic void initiateGLInstances () {\n\t\tif (usingGL30) {\n\t\t\tgl30 = new LwjglGL30();\n\t\t\tgl20 = gl30;","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/libgdx/libgdx/blob/97f40861878058087be0685ca167ddfde132134b/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGraphics.java#L397-L433","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Update/install proper GPU drivers (or enable 3D acceleration in the VM settings)","Set config.allowSoftwareMode = true in LwjglApplicationConfiguration to fall back to software OpenGL (e.g. Mesa llvmpipe, Windows GDI)","Avoid launching the game over remote desktop, or use a local session","If requesting GLES30 context attributes, drop them (useGL30 false / lower gles30ContextMajor/Minor) since the driver may reject the profile"],"exampleFix":"// before\nLwjglApplicationConfiguration config = new LwjglApplicationConfiguration();\n// allowSoftwareMode defaults to false\n\n// after\nLwjglApplicationConfiguration config = new LwjglApplicationConfiguration();\nconfig.allowSoftwareMode = true; // permits software OpenGL fallback","handlingStrategy":"fallback","validationCode":"// no reliable pre-check from Java; approximate with a capability probe\nimport org.lwjgl.opengl.GLContext;\n// best available guard: set allowSoftwareMode and verify a context can be created at startup on a test machine","typeGuard":null,"tryCatchPattern":"try {\n    new LwjglApplication(game, config);\n} catch (GdxRuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"OpenGL is not supported\")) {\n        showDriverHelpDialog(); // instruct user to install GPU drivers\n    }\n}","preventionTips":["Set allowSoftwareMode = true for broad compatibility builds","Document GPU driver requirements in your README","Detect remote-desktop/headless environments at launch and warn"],"tags":["opengl","lwjgl","driver","startup","environment"],"backgroundTag":null,"analyzedSha":"97f40861878058087be0685ca167ddfde132134b","analyzedAt":"2026-08-14T10:52:53.492Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}