Replies: 3 comments
-
This sounds like a bug, unfortunately despite being one of the maintainers of the WebGPU bindings in Emscripten (cc @shrekshao) I'm not familiar enough with Emscripten's canvas code to know how to do this correctly. Please go ahead and file a bug. |
Beta Was this translation helpful? Give feedback.
0 replies
-
#17522 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I use the WebGPU basic rendering, I click the fullscreen button. The canvas is set to zero width and height.
emscripten/src/library_browser.js
Line 409 in 77da629
When the full screen button is clicked, this function is called. And it will call into updateCanvasDimensions.
emscripten/src/library_browser.js
Lines 732 to 777 in 77da629
wNative and hNative is not set. They will be set to the canvas.widthNative and canvas.heightNative. But there're no widthNative and heightNative as well.
I think the problem is canvas.widthNative and canvas.heightNative is never set.
I can make it working by add this line.
emscripten_set_canvas_size(kWidth,kHeight);
But the
emscripten_set_canvas_size
is deprecated. If I use theemscripten_set_canvas_element_size
, it doesn't set the canvas.widthNative and canvas.heightNative. Then the fullscreen is not working.xlib, glut, sdl, glfw will all call Browser.setCanvasSize. But the webgpu just get a
SurfaceDescriptorFromCanvasHTMLSelector
. So it doesn't need the initialize with library_xxx.js. Then the canvasSize is never set.Is it a bug? Should I submit a bug report?
Beta Was this translation helpful? Give feedback.
All reactions