diff options
author | 2025-01-02 13:50:37 +0100 | |
---|---|---|
committer | 2025-01-02 13:50:37 +0100 | |
commit | ba6f5853e9382a959af8ff81980c0f06a6ffe80e (patch) | |
tree | 82f1b4963be587f0aa8766a03557c58996b4ca38 /3rdparty/bgfx/src/glcontext_html5.cpp | |
parent | 6a403fc29993062aa451f5557cc88abc2fe7b2e7 (diff) |
Cherry-pick wayland improvements from upstream bgfx (#13070)
* Properly support Wayland under EGL and Vulkan. (#3358)
* Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359)
* Cleanup.
* Support both X11 and Wayland in the same build. (#3360)
* Support both X11 and Wayland in the same build.
- Works for both Vulkan and OpenGL.
- Remove --with-wayland from genie options.
- Vulkan loads all three extensions for surface creation instead of only one.
- Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
a SwapChain with the given window size.
- Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
recreating to make sure the window is released of its swapchain.
- Fix dbgText glitch in example-22-windows.
- Remove old X11-related dependencies for GLFW3.
* Formatting.
* Adapt to latest bgfx wayland code
* Cleanup.
* Fix Vulkan swapchain invalidation issue. (#3379)
* Fix Vulkan swapchain invalidation issue.
* Always clamp render pass to frame buffer size.
* Fix formatting.
* Hopefully fix macOS build
* Hopefully fix macOS build, attempt 2
---------
Co-authored-by: Martijn Courteaux <courteauxmartijn@gmail.com>
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
Diffstat (limited to '3rdparty/bgfx/src/glcontext_html5.cpp')
-rw-r--r-- | 3rdparty/bgfx/src/glcontext_html5.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/3rdparty/bgfx/src/glcontext_html5.cpp b/3rdparty/bgfx/src/glcontext_html5.cpp index 016b7c189b3..0e55b792deb 100644 --- a/3rdparty/bgfx/src/glcontext_html5.cpp +++ b/3rdparty/bgfx/src/glcontext_html5.cpp @@ -86,7 +86,7 @@ namespace bgfx { namespace gl } else { - m_primary = createSwapChain((void*)canvas); + m_primary = createSwapChain((void*)canvas, (int)_width, (int)_height) ); } if (0 != _width @@ -122,9 +122,10 @@ namespace bgfx { namespace gl EMSCRIPTEN_CHECK(emscripten_set_canvas_element_size(m_primary->m_canvas, (int) _width, (int) _height) ); } - SwapChainGL* GlContext::createSwapChain(void* _nwh) + SwapChainGL* GlContext::createSwapChain(void* _nwh, int _width, int _height) { emscripten_webgl_init_context_attributes(&s_attrs); + BX_UNUSED(_width, _height); // Work around bug https://bugs.chromium.org/p/chromium/issues/detail?id=1045643 in Chrome // by having alpha always enabled. |