mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 04:53:06 +01:00
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.
This commit is contained in:
committed by
GitHub
parent
3f9fe0d34e
commit
e488a07f1b
@@ -3060,7 +3060,8 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
|
||||
#if BGFX_CONFIG_RENDERER_OPENGLES && (BGFX_CONFIG_RENDERER_OPENGLES < 30)
|
||||
if (!m_maxMsaa && s_extension[Extension::IMG_multisampled_render_to_texture].m_supported) {
|
||||
if (!m_maxMsaa && s_extension[Extension::IMG_multisampled_render_to_texture].m_supported)
|
||||
{
|
||||
GL_CHECK(glGetIntegerv(GL_MAX_SAMPLES_IMG, &m_maxMsaa) );
|
||||
}
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
@@ -7121,7 +7122,9 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
attachment = GL_DEPTH_ATTACHMENT;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
attachment = GL_COLOR_ATTACHMENT0 + colorIdx;
|
||||
++colorIdx;
|
||||
}
|
||||
@@ -7151,7 +7154,7 @@ namespace bgfx { namespace gl
|
||||
void FrameBufferGL::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat)
|
||||
{
|
||||
BX_UNUSED(_format, _depthFormat);
|
||||
m_swapChain = s_renderGL->m_glctx.createSwapChain(_nwh);
|
||||
m_swapChain = s_renderGL->m_glctx.createSwapChain(_nwh, _width, _height);
|
||||
m_width = _width;
|
||||
m_height = _height;
|
||||
m_numTh = 0;
|
||||
|
||||
Reference in New Issue
Block a user