You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this using the step095-emscripten branch configured for native build target, but I assume it affects most of the examples.
My Huawei laptop has a screen resolution of 3000x2000. When I try to go full screen with the application, it has an error. I put an #ifdef to change the requested limits to 4096, except for Emscripten build proper keep at 2048. (This does not prevent going fullscreen from the web version, nevertheless.)
Alternatively perhaps you could detect that the window is about to go above 2048 in a dimension and either pop an informative error message or limit the maximized side of the window.
#ifdef __EMSCRIPTEN__
// Allow textures up to 2K
requiredLimits.limits.maxTextureDimension1D = 2048;
requiredLimits.limits.maxTextureDimension2D = 2048;
#else
// (My laptop has horizontal resolution of 3000.)
// Allow textures up to 4K
requiredLimits.limits.maxTextureDimension1D = 4096;
requiredLimits.limits.maxTextureDimension2D = 4096;
#endif
The text was updated successfully, but these errors were encountered:
You could indeed use glfwGetMonitors and then glfwGetMonitorWorkarea when initializing WebGPU limits to set them to at least the size of your biggest monitor!
I'll add a note in the "Resizing the window" chapter
I encountered this using the step095-emscripten branch configured for native build target, but I assume it affects most of the examples.
My Huawei laptop has a screen resolution of 3000x2000. When I try to go full screen with the application, it has an error. I put an #ifdef to change the requested limits to 4096, except for Emscripten build proper keep at 2048. (This does not prevent going fullscreen from the web version, nevertheless.)
Alternatively perhaps you could detect that the window is about to go above 2048 in a dimension and either pop an informative error message or limit the maximized side of the window.
The text was updated successfully, but these errors were encountered: