summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/entry_winrt.cx
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-09-03 13:30:42 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-09-03 13:30:42 +0200
commitd193abb0ad0827d5ecc0915d65b67faf68a87097 (patch)
tree9a750cfbd4d229c4607f4d9aaf76dea89944a0bd /3rdparty/bgfx/examples/common/entry/entry_winrt.cx
parentd8cd5ca1346607349be6777d29358acef1e4517c (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_winrt.cx')
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_winrt.cx15
1 files changed, 14 insertions, 1 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_winrt.cx b/3rdparty/bgfx/examples/common/entry/entry_winrt.cx
index 796d1f64f48..db90098cec0 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_winrt.cx
+++ b/3rdparty/bgfx/examples/common/entry/entry_winrt.cx
@@ -9,6 +9,7 @@
#include <bgfx/bgfxplatform.h>
#include <bx/thread.h>
+#include <Unknwn.h>
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Core;
@@ -26,6 +27,18 @@ static char* g_emptyArgs[] = { "" };
static entry::WindowHandle g_defaultWindow = { 0 };
static entry::EventQueue g_eventQueue;
+///
+inline void winrtSetWindow(::IUnknown* _window)
+{
+ bgfx::PlatformData pd;
+ pd.ndt = NULL;
+ pd.nwh = _window;
+ pd.context = NULL;
+ pd.backBuffer = NULL;
+ pd.backBufferDS = NULL;
+ bgfx::setPlatformData(pd);
+}
+
ref class App sealed : public IFrameworkView
{
public:
@@ -56,7 +69,7 @@ public:
window->Closed += ref new
TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
- bgfx::winrtSetWindow(reinterpret_cast<IUnknown*>(window) );
+ winrtSetWindow(reinterpret_cast<IUnknown*>(window) );
}
virtual void Load(String^ entryPoint)