Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlContext::createSwapChain fails when g_platformData.context != nullptr #3386

Open
AdamBalazsVay opened this issue Dec 13, 2024 · 0 comments

Comments

@AdamBalazsVay
Copy link

Steps to reproduce the behavior:

  1. Init BGFX with init.platformData.context != nullptr
  2. In GlContext::create m_display won't be set, remains nullptr:
    m_display = eglGetDisplay(NULL == ndt ? EGL_DEFAULT_DISPLAY : ndt);
  3. In GlContext::create m_config won't be set:
    success = eglChooseConfig(m_display, attrs, &m_config, 1, &numConfig);
  4. GlContext::createSwapChain fails, as m_display and m_config are invalid:
    return BX_NEW(g_allocator, SwapChainGL)(m_display, m_config, m_context, (EGLNativeWindowType)_nwh, _width, _height);

Expected behavior
BGFX should work with an externally set context, GlContext's m_display and m_config should contain meaningful data even in these cases.

@AdamBalazsVay AdamBalazsVay changed the title GlContext::createSwapChain fails when g_platformData.context != nullpt GlContext::createSwapChain fails when g_platformData.context != nullptr Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant