mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Cleanup.
This commit is contained in:
parent
43a34ac38f
commit
1e458f4332
1 changed files with 8 additions and 18 deletions
|
@ -5,24 +5,15 @@
|
||||||
|
|
||||||
#include "bgfx_p.h"
|
#include "bgfx_p.h"
|
||||||
|
|
||||||
#if (BGFX_CONFIG_RENDERER_OPENGLES2|BGFX_CONFIG_RENDERER_OPENGLES3|BGFX_CONFIG_RENDERER_OPENGL)
|
#if BX_PLATFORM_OSX && (BGFX_CONFIG_RENDERER_OPENGLES2|BGFX_CONFIG_RENDERER_OPENGLES3|BGFX_CONFIG_RENDERER_OPENGL)
|
||||||
# include "renderer_gl.h"
|
# include "renderer_gl.h"
|
||||||
|
|
||||||
# if BX_PLATFORM_OSX
|
|
||||||
|
|
||||||
# include <mach-o/dyld.h>
|
|
||||||
# include <dlfcn.h>
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <string.h>
|
|
||||||
# include <Cocoa/Cocoa.h>
|
# include <Cocoa/Cocoa.h>
|
||||||
# include <OpenGL/OpenGL.h>
|
# include <bx/os.h>
|
||||||
|
|
||||||
static void* NSGLGetProcAddress (const char* name) {
|
static void* NSGLGetProcAddress (const char* name) {
|
||||||
static void* const dylib =
|
static void* dylib =
|
||||||
dlopen("/System/Library/Frameworks/"
|
bx::dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL");
|
||||||
"OpenGL.framework/Versions/Current/OpenGL",
|
return dylib ? bx::dlsym(dylib, name) : NULL;
|
||||||
RTLD_LAZY);
|
|
||||||
return dylib ? dlsym(dylib, name) : NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace bgfx
|
namespace bgfx
|
||||||
|
@ -37,7 +28,7 @@ namespace bgfx
|
||||||
NSWindow* nsWindow = (NSWindow*)g_bgfxNSWindow;
|
NSWindow* nsWindow = (NSWindow*)g_bgfxNSWindow;
|
||||||
|
|
||||||
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {
|
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {
|
||||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, //NSOpenGLProfileVersion3_2Core,
|
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, // NSOpenGLProfileVersion3_2Core,
|
||||||
NSOpenGLPFAColorSize , 24,
|
NSOpenGLPFAColorSize , 24,
|
||||||
NSOpenGLPFAAlphaSize , 8,
|
NSOpenGLPFAAlphaSize , 8,
|
||||||
NSOpenGLPFADepthSize , 24,
|
NSOpenGLPFADepthSize , 24,
|
||||||
|
@ -104,5 +95,4 @@ namespace bgfx
|
||||||
|
|
||||||
} // namespace bgfx
|
} // namespace bgfx
|
||||||
|
|
||||||
# endif // BX_PLATFORM_OSX
|
#endif // BX_PLATFORM_OSX && (BGFX_CONFIG_RENDERER_OPENGLES2|BGFX_CONFIG_RENDERER_OPENGLES3|BGFX_CONFIG_RENDERER_OPENGL)
|
||||||
#endif //(BGFX_CONFIG_RENDERER_OPENGLES2|BGFX_CONFIG_RENDERER_OPENGLES3|BGFX_CONFIG_RENDERER_OPENGL)
|
|
||||||
|
|
Loading…
Reference in a new issue