mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Fixed shutdown on OSX.
This commit is contained in:
parent
d30a5240d7
commit
fcf71d35f3
3 changed files with 18 additions and 4 deletions
|
@ -26,8 +26,16 @@ namespace bgfx
|
|||
|
||||
NSWindow* nsWindow = (NSWindow*)g_bgfxNSWindow;
|
||||
|
||||
NSOpenGLPixelFormatAttribute profile =
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||
NSOpenGLProfileVersion3_2Core
|
||||
#else
|
||||
NSOpenGLProfileVersionLegacy
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||
;
|
||||
|
||||
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {
|
||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, // NSOpenGLProfileVersion3_2Core,
|
||||
NSOpenGLPFAOpenGLProfile, profile,
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
NSOpenGLPFADepthSize, 24,
|
||||
|
|
|
@ -456,9 +456,12 @@ namespace bgfx
|
|||
}
|
||||
|
||||
void invalidateCache()
|
||||
{
|
||||
if (m_vaoSupport)
|
||||
{
|
||||
m_vaoCache.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void updateCapture()
|
||||
{
|
||||
|
@ -2258,12 +2261,13 @@ namespace bgfx
|
|||
|
||||
for (GLint ii = 0; ii < numCmpFormats; ++ii)
|
||||
{
|
||||
BX_TRACE("\t%3d: %8x", ii, formats[ii]);
|
||||
BX_TRACE(" %3d: %8x", ii, formats[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
# define GL_GET(_pname, _min) BX_TRACE(#_pname " %d (min: %d)", glGet(_pname), _min)
|
||||
# define GL_GET(_pname, _min) BX_TRACE(" " #_pname " %d (min: %d)", glGet(_pname), _min)
|
||||
|
||||
BX_TRACE("Defaults:");
|
||||
# if BX_PLATFORM_OSX
|
||||
GL_GET(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 16 * 4);
|
||||
GL_GET(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 128 * 4);
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||
# if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||
# define GLCOREARB_PROTOTYPES
|
||||
# include <gl/glcorearb.h>
|
||||
# define GL_ARB_shader_objects // OSX collsion with GLhandleARB in gltypes.h
|
||||
# else
|
||||
# if BX_PLATFORM_LINUX
|
||||
# define GL_PROTOTYPES
|
||||
|
|
Loading…
Reference in a new issue