{"record":{"id":"078a13d5c6fbaa5b","repo":"slint-ui/slint","slug":"cannot-proceed-without-webgl-aborting","errorCode":null,"errorMessage":"Cannot proceed without WebGL - aborting","messagePattern":"Cannot proceed without WebGL - aborting","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/renderers/femtovg/opengl.rs","lineNumber":136,"sourceCode":"        let gl_renderer = match femtovg::renderer::OpenGl::new_from_html_canvas(&html_canvas) {\n            Ok(gl_renderer) => gl_renderer,\n            Err(_) => {\n                use wasm_bindgen::JsCast;\n\n                // I don't believe that there's a way of disabling the 2D canvas.\n                let context_2d = html_canvas\n                    .get_context(\"2d\")\n                    .unwrap()\n                    .unwrap()\n                    .dyn_into::<web_sys::CanvasRenderingContext2d>()\n                    .unwrap();\n                context_2d.set_font(\"20px serif\");\n                // We don't know if we're rendering on dark or white background, so choose a \"color\" in the middle for the text.\n                context_2d.set_fill_style_str(\"red\");\n                context_2d\n                    .fill_text(\"Slint requires WebGL to be enabled in your browser\", 0., 30.)\n                    .unwrap();\n                panic!(\"Cannot proceed without WebGL - aborting\")\n            }\n        };\n\n        let femtovg_canvas = femtovg::Canvas::new_with_text_context(\n            gl_renderer,\n            crate::font_cache::FONT_CACHE.with(|cache| cache.borrow().text_context.clone()),\n        )\n        .unwrap();\n\n        *self.opengl_context.borrow_mut() = opengl_context;\n        #[cfg(target_family = \"wasm\")]\n        {\n            *self.html_canvas.borrow_mut() = Some(html_canvas);\n        }\n\n        let canvas = Rc::new(RefCell::new(femtovg_canvas));\n        renderer.reset_canvas(canvas);\n        Ok(())","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/renderers/femtovg/opengl.rs#L118-L154","documentation":"Error \"Cannot proceed without WebGL - aborting\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/renderers/femtovg/opengl.rs:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Serve the page in a browser with WebGL support enabled.","Use the software renderer fallback if WebGL is unavailable."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}