aboutsummaryrefslogtreecommitdiff
path: root/pugl/detail/mac_gl.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/detail/mac_gl.m')
-rw-r--r--pugl/detail/mac_gl.m17
1 files changed, 17 insertions, 0 deletions
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 = {