mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 12:42:34 +01:00
Fixed Android build.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user