improve EGL context creation

This commit is contained in:
Max Argus
2020-03-06 17:42:07 +01:00
parent 034c6b36ef
commit 5bd9e4ec9b

View File

@@ -141,8 +141,13 @@ void EGLOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci)
if (eglGetError() == EGL_SUCCESS && initialized == EGL_TRUE)
{
m_data->egl_display = display;
break;
}
}
else
{
fprintf(stderr, "GetDisplay %d failed with error: %x\n", i, eglGetError());
}
}
}
else
@@ -166,6 +171,10 @@ void EGLOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci)
m_data->egl_display = display;
}
}
else
{
fprintf(stderr, "GetDisplay %d failed with error: %x\n", m_data->m_renderDevice, eglGetError());
}
}
if (!eglInitialize(m_data->egl_display, NULL, NULL))