From a9643c8eaa7788ef87b6cddc3311193bd0f8f533 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 20 Nov 2019 23:56:05 +0100 Subject: Mac: Move puglGetProcAddress() to mac_gl.m --- pugl/detail/mac.m | 17 ----------------- pugl/detail/mac_gl.m | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m index 2e077be..7534281 100644 --- a/pugl/detail/mac.m +++ b/pugl/detail/mac.m @@ -927,23 +927,6 @@ puglProcessEvents(PuglView* view) return puglDispatchEvents(view->world); } -PuglGlFunc -puglGetProcAddress(const char *name) -{ - CFBundleRef framework = - CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); - - CFStringRef symbol = CFStringCreateWithCString( - kCFAllocatorDefault, name, kCFStringEncodingASCII); - - PuglGlFunc func = (PuglGlFunc)CFBundleGetFunctionPointerForName( - framework, symbol); - - CFRelease(symbol); - - return func; -} - double puglGetTime(const PuglWorld* world) { diff --git a/pugl/detail/mac_gl.m b/pugl/detail/mac_gl.m index 6e3c1c6..f39c25e 100644 --- a/pugl/detail/mac_gl.m +++ b/pugl/detail/mac_gl.m @@ -159,6 +159,23 @@ puglMacGlResize(PuglView* view, int PUGL_UNUSED(width), int PUGL_UNUSED(height)) return PUGL_SUCCESS; } +PuglGlFunc +puglGetProcAddress(const char *name) +{ + CFBundleRef framework = + CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); + + CFStringRef symbol = CFStringCreateWithCString( + kCFAllocatorDefault, name, kCFStringEncodingASCII); + + PuglGlFunc func = (PuglGlFunc)CFBundleGetFunctionPointerForName( + framework, symbol); + + CFRelease(symbol); + + return func; +} + const PuglBackend* puglGlBackend(void) { static const PuglBackend backend = { -- cgit v1.2.1