diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 60a64d73..a298a19b 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -754,7 +754,7 @@ namespace bgfx #if BGFX_CONFIG_MULTITHREADED if (_createRenderThread) { - m_thread.init(); + m_thread.init(renderThread, this); } #else BX_UNUSED(_createRenderThread); diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 15da254c..8421aa24 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -1412,8 +1412,7 @@ namespace bgfx struct Context { Context() - : m_thread(renderThread, thisSuppressC4355() ) - , m_render(&m_frame[0]) + : m_render(&m_frame[0]) , m_submit(&m_frame[1]) , m_dynamicIndexBufferHandle(BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS) , m_dynamicVertexBufferHandle(BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS) @@ -1437,11 +1436,6 @@ namespace bgfx { } - Context* thisSuppressC4355() - { - return this; - } - static int32_t renderThread(void* _userData) { Context* ctx = (Context*)_userData;