mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 22:03:12 +01:00
Moving window creation to examples/common.
This commit is contained in:
18
src/bgfx.cpp
18
src/bgfx.cpp
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user