summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-30 15:53:05 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-30 15:53:05 +0200
commit4f6965d39f9fcc0b2eaa4cc97ed096da5c16623d (patch)
tree2e07a5012d8fe7ea0011d3d89cbd6c937e5f1ee0 /src
parent75016cb8530c886fad9227b015413da0634aa63a (diff)
Support of FLTK widgets in OpenGL 3 windows under Windows.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Choice.cxx12
-rw-r--r--src/Fl_Gl_Window_Driver.H2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx
index bafab56fd..f67ce0a17 100644
--- a/src/Fl_Gl_Choice.cxx
+++ b/src/Fl_Gl_Choice.cxx
@@ -32,6 +32,17 @@
// from glew.h in Windows, glext.h in Unix, not used by FLTK's macOS platform
# define GL_CURRENT_PROGRAM 0x8B8D
#endif
+
+// TODO: remove that from this platform-independent source file
+#ifdef _WIN32
+# include <windows.h> // for WINAPI
+#else
+# define WINAPI
+#endif
+
+typedef void (WINAPI *glUseProgram_type)(GLint);
+static glUseProgram_type glUseProgram_f = NULL;
+
GLContext *Fl_Gl_Window_Driver::context_list = 0;
int Fl_Gl_Window_Driver::nContext = 0;
static int NContext = 0;
@@ -60,7 +71,6 @@ void Fl_Gl_Window_Driver::del_context(GLContext ctx) {
if (!nContext) gl_remove_displaylist_fonts();
}
-Fl_Gl_Window_Driver::glUseProgram_type Fl_Gl_Window_Driver::glUseProgram_f = NULL;
void Fl_Gl_Window_Driver::switch_to_GL1() {
if (!glUseProgram_f) {
diff --git a/src/Fl_Gl_Window_Driver.H b/src/Fl_Gl_Window_Driver.H
index 383b6bf56..5c44a8c32 100644
--- a/src/Fl_Gl_Window_Driver.H
+++ b/src/Fl_Gl_Window_Driver.H
@@ -36,8 +36,6 @@ class Fl_Font_Descriptor;
class Fl_Gl_Window_Driver {
private:
GLint current_prog;
- typedef void (*glUseProgram_type)(GLint);
- static glUseProgram_type glUseProgram_f;
protected:
Fl_Gl_Window *pWindow;
public: