This commit is contained in:
bkaradzic
2012-05-31 22:10:32 -07:00
parent a48b3a9ee3
commit 63a76ae99d
5 changed files with 22 additions and 45 deletions

View File

@@ -528,10 +528,10 @@ namespace bgfx
s_ctx.frame();
}
void renderFrame()
bool renderFrame()
{
BGFX_RENDER_THREAD();
s_ctx.renderFrame();
return s_ctx.renderFrame();
}
static const uint32_t s_attribTypeSize[AttribType::Count] =
@@ -730,6 +730,16 @@ namespace bgfx
m_render->destroy();
}
#if BX_PLATFORM_WINDOWS
DWORD WINAPI renderThread(LPVOID)
#else
void* renderThread(void*)
#endif // BX_PLATFORM_WINDOWS
{
while (!renderFrame() );
return EXIT_SUCCESS;
}
const Memory* alloc(uint32_t _size)
{
Memory* mem = (Memory*)g_realloc(NULL, sizeof(Memory) + _size);