mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Cleanup.
This commit is contained in:
20
src/bgfx.cpp
20
src/bgfx.cpp
@@ -13,8 +13,8 @@
|
||||
#include "topology.h"
|
||||
|
||||
#if BX_PLATFORM_OSX
|
||||
#include <objc/message.h>
|
||||
#endif
|
||||
# include <objc/message.h>
|
||||
#endif // BX_PLATFORM_OSX
|
||||
|
||||
BX_ERROR_RESULT(BGFX_ERROR_TEXTURE_VALIDATION, BX_MAKEFOURCC('b', 'g', 0, 1) );
|
||||
|
||||
@@ -2186,30 +2186,32 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if BX_PLATFORM_OSX
|
||||
struct NSAutoreleasePoolScope
|
||||
{
|
||||
NSAutoreleasePoolScope()
|
||||
{
|
||||
id obj = class_createInstance(objc_getClass("NSAutoreleasePool"),0);
|
||||
pool = objc_msgSend(obj, sel_getUid("init"));
|
||||
id obj = class_createInstance(objc_getClass("NSAutoreleasePool"), 0);
|
||||
pool = objc_msgSend(obj, sel_getUid("init") );
|
||||
}
|
||||
|
||||
~NSAutoreleasePoolScope()
|
||||
{
|
||||
objc_msgSend(pool, sel_getUid("release"));
|
||||
objc_msgSend(pool, sel_getUid("release") );
|
||||
}
|
||||
|
||||
id pool;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // BX_PLATFORM_OSX
|
||||
|
||||
RenderFrame::Enum Context::renderFrame(int32_t _msecs)
|
||||
{
|
||||
BGFX_PROFILER_SCOPE("bgfx::renderFrame", 0xff2040ff);
|
||||
|
||||
#if BX_PLATFORM_OSX
|
||||
NSAutoreleasePoolScope pool;
|
||||
#endif
|
||||
#endif // BX_PLATFORM_OSX
|
||||
|
||||
if (!m_flipAfterRender)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user