summaryrefslogtreecommitdiff
path: root/src/drivers/Cocoa
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-14 08:53:45 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-14 08:53:45 +0200
commit700fb1aadd86f6fc81f4acccfe44dd539f487c57 (patch)
tree8457c2c855f59c680885755ba981d59aee62893b /src/drivers/Cocoa
parentf265ca2afc52c5b9fcd7494ac182278ad92f6939 (diff)
Improve virtual void* Fl_Gl_Window_Driver::GetProcAddress(procName)
Diffstat (limited to 'src/drivers/Cocoa')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H1
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H
index 9a3d06086..1f0332103 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H
+++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H
@@ -42,6 +42,7 @@ class Fl_Cocoa_Gl_Window_Driver : public Fl_Gl_Window_Driver {
virtual char *alpha_mask_for_string(const char *str, int n, int w, int h, Fl_Fontsize fs);
virtual Fl_RGB_Image* capture_gl_rectangle(int x, int y, int w, int h);
virtual bool need_scissor() { return true; }
+ virtual void* GetProcAddress(const char *procName);
void apply_scissor();
};
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx
index a77ff7776..4d47c3015 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.cxx
@@ -25,6 +25,7 @@
#include <FL/Fl_Graphics_Driver.H>
#include <OpenGL/OpenGL.h>
#include <FL/Fl_Image_Surface.H>
+#include <dlfcn.h>
extern void gl_texture_reset();
@@ -293,6 +294,11 @@ Fl_RGB_Image* Fl_Cocoa_Gl_Window_Driver::capture_gl_rectangle(int x, int y, int
}
+void* Fl_Cocoa_Gl_Window_Driver::GetProcAddress(const char *procName) {
+ return dlsym(RTLD_DEFAULT, procName);
+}
+
+
FL_EXPORT NSOpenGLContext *fl_mac_glcontext(GLContext rc) {
return (NSOpenGLContext*)rc;
}