OSX: Moved NSOpenGLContext creation to the main thread that created NSWindow. Fixes occasional GL_INVALID_FRAME_BUFFER_OPERATION error on DrawElements.

This commit is contained in:
bkaradzic
2013-11-18 20:43:17 -08:00
parent 2563c271b0
commit 04f348c2ea
5 changed files with 50 additions and 19 deletions

View File

@@ -15,8 +15,6 @@ namespace bgfx
# include "glimports.h"
# undef GL_IMPORT
extern bool hasContext();
void naclSwapCompleteCb(void* /*_data*/, int32_t /*_result*/);
PP_CompletionCallback naclSwapComplete =
@@ -80,10 +78,7 @@ namespace bgfx
s_ppapi.swap();
}
if (hasContext() )
{
renderFrame();
}
renderFrame();
}
static void GL_APIENTRY naclVertexAttribDivisor(GLuint _index, GLuint _divisor)