mirror of
https://github.com/penpot/penpot.git
synced 2025-05-04 22:05:55 +02:00
✨ Enable WEBGL_debug_renderer_info extension before initializing the render (#5959)
This commit is contained in:
parent
fefb946a25
commit
e30834bb2d
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue