diff options
author | 2016-09-03 13:30:42 +0200 | |
---|---|---|
committer | 2016-09-03 13:30:42 +0200 | |
commit | d193abb0ad0827d5ecc0915d65b67faf68a87097 (patch) | |
tree | 9a750cfbd4d229c4607f4d9aaf76dea89944a0bd /3rdparty/bgfx/examples/common/entry/entry_android.cpp | |
parent | d8cd5ca1346607349be6777d29358acef1e4517c (diff) |
Update BGFX and BX packages and update MAME code to support new API (nw)
Generated missing shaders (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_android.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_android.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index 90bfd131368..155fb894bce 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -17,6 +17,7 @@ #include <android/looper.h> #include <android/window.h> #include <android_native_app_glue.h> +#include <android/native_window.h> extern "C" { @@ -28,6 +29,18 @@ extern "C" namespace entry { + /// + inline void androidSetWindow(::ANativeWindow* _window) + { + bgfx::PlatformData pd; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backBuffer = NULL; + pd.backBufferDS = NULL; + bgfx::setPlatformData(pd); + } + struct GamepadRemap { uint16_t m_keyCode; @@ -142,7 +155,7 @@ namespace entry if (m_window != m_app->window) { m_window = m_app->window; - bgfx::androidSetWindow(m_window); + androidSetWindow(m_window); int32_t width = ANativeWindow_getWidth(m_window); int32_t height = ANativeWindow_getHeight(m_window); |