mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -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;
|
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[] = {
|
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {
|
||||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, // NSOpenGLProfileVersion3_2Core,
|
NSOpenGLPFAOpenGLProfile, profile,
|
||||||
NSOpenGLPFAColorSize, 24,
|
NSOpenGLPFAColorSize, 24,
|
||||||
NSOpenGLPFAAlphaSize, 8,
|
NSOpenGLPFAAlphaSize, 8,
|
||||||
NSOpenGLPFADepthSize, 24,
|
NSOpenGLPFADepthSize, 24,
|
||||||
|
|
|
@ -457,7 +457,10 @@ namespace bgfx
|
||||||
|
|
||||||
void invalidateCache()
|
void invalidateCache()
|
||||||
{
|
{
|
||||||
m_vaoCache.invalidate();
|
if (m_vaoSupport)
|
||||||
|
{
|
||||||
|
m_vaoCache.invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateCapture()
|
void updateCapture()
|
||||||
|
@ -2258,12 +2261,13 @@ namespace bgfx
|
||||||
|
|
||||||
for (GLint ii = 0; ii < numCmpFormats; ++ii)
|
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
|
# if BX_PLATFORM_OSX
|
||||||
GL_GET(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 16 * 4);
|
GL_GET(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 16 * 4);
|
||||||
GL_GET(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 128 * 4);
|
GL_GET(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 128 * 4);
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
|
|
||||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||||
# if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
# if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||||
|
# define GLCOREARB_PROTOTYPES
|
||||||
# include <gl/glcorearb.h>
|
# include <gl/glcorearb.h>
|
||||||
|
# define GL_ARB_shader_objects // OSX collsion with GLhandleARB in gltypes.h
|
||||||
# else
|
# else
|
||||||
# if BX_PLATFORM_LINUX
|
# if BX_PLATFORM_LINUX
|
||||||
# define GL_PROTOTYPES
|
# define GL_PROTOTYPES
|
||||||
|
|
Loading…
Reference in a new issue