From e30834bb2d7af7ea30a1934df610a6ed7b94e026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Torr=C3=B3?= Date: Wed, 26 Feb 2025 11:32:27 +0100 Subject: [PATCH] :sparkles: Enable WEBGL_debug_renderer_info extension before initializing the render (#5959) --- frontend/src/app/render_wasm/api.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/render_wasm/api.cljs b/frontend/src/app/render_wasm/api.cljs index cdb1aeeac..51f53c7bb 100644 --- a/frontend/src/app/render_wasm/api.cljs +++ b/frontend/src/app/render_wasm/api.cljs @@ -877,11 +877,13 @@ (let [gl (unchecked-get internal-module "GL") flags (debug-flags) context (.getContext ^js canvas "webgl2" canvas-options) - ;; Register the context with emscripten handle (.registerContext ^js gl context #js {"majorVersion" 2})] (.makeContextCurrent ^js gl handle) + ;; Force the WEBGL_debug_renderer_info extension as emscripten does not enable it + (.getExtension context "WEBGL_debug_renderer_info") + ;; Initialize Wasm Render Engine (h/call internal-module "_init" (/ (.-width ^js canvas) dpr) (/ (.-height ^js canvas) dpr)) (h/call internal-module "_set_render_options" flags dpr))