diff --git a/src/glcontext_egl.cpp b/src/glcontext_egl.cpp index e7b7ecbb9..97517bd6b 100644 --- a/src/glcontext_egl.cpp +++ b/src/glcontext_egl.cpp @@ -546,14 +546,21 @@ WL_EGL_IMPORT EGLNativeWindowType nwh = (EGLNativeWindowType )g_platformData.nwh; eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface(m_display, m_surface); + m_surface = eglCreateWindowSurface(m_display, m_config, nwh, NULL); BGFX_FATAL(m_surface != EGL_NO_SURFACE, Fatal::UnableToInitialize, "Failed to create surface."); + EGLBoolean success = eglMakeCurrent(m_display, m_surface, m_surface, m_context); BGFX_FATAL(success, Fatal::UnableToInitialize, "Failed to set context."); EGLint format; eglGetConfigAttrib(m_display, m_config, EGL_NATIVE_VISUAL_ID, &format); - ANativeWindow_setBuffersGeometry( (ANativeWindow*)g_platformData.nwh, _width, _height, format); + ANativeWindow_setBuffersGeometry( + (ANativeWindow*)g_platformData.nwh + , _resolution.width + , _resolution.height + , format + ); } # elif BX_PLATFORM_EMSCRIPTEN EMSCRIPTEN_CHECK(emscripten_set_canvas_element_size(