Moving window creation to examples/common.

This commit is contained in:
bkaradzic
2013-01-13 10:47:30 -08:00
parent 59058e7200
commit d6e4a57cf2
14 changed files with 398 additions and 197 deletions

View File

@@ -37,6 +37,13 @@ namespace bgfx
# define BGFX_CHECK_RENDER_THREAD()
#endif // BGFX_CONFIG_MULTITHREADED
#if BX_PLATFORM_WINDOWS
void setHwnd(HWND _hwnd)
{
g_bgfxHwnd = _hwnd;
}
#endif // BX_PLATFORM_WINDOWS
struct CallbackStub : public CallbackI
{
virtual ~CallbackStub()
@@ -643,13 +650,6 @@ namespace bgfx
write(&_value, sizeof(void*) );
}
#if BX_PLATFORM_WINDOWS
LRESULT CALLBACK Context::Window::wndProc(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam)
{
return s_ctx.m_window.process(_hwnd, _id, _wparam, _lparam);
}
#endif // BX_PLATFORM_WINDOWS
void Context::init(bool _createRenderThread)
{
BX_TRACE("init");
@@ -657,10 +657,6 @@ namespace bgfx
m_submit->create();
m_render->create();
#if BX_PLATFORM_WINDOWS
m_window.init();
#endif // BX_PLATFORM_
#if BGFX_CONFIG_MULTITHREADED
if (_createRenderThread)
{