|
|
commit 4f6965d39f9fcc0b2eaa4cc97ed096da5c16623d
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 30 15:53:05 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 30 15:53:05 2022 +0200
Support of FLTK widgets in OpenGL 3 windows under Windows.
src/Fl_Gl_Choice.cxx | 12 +++++++++++-
src/Fl_Gl_Window_Driver.H | 2 --
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git src/Fl_Gl_Choice.cxx src/Fl_Gl_Choice.cxx
index bafab56..f67ce0a 100644
--- src/Fl_Gl_Choice.cxx
+++ 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 src/Fl_Gl_Window_Driver.H src/Fl_Gl_Window_Driver.H
index 383b6bf..5c44a8c 100644
--- src/Fl_Gl_Window_Driver.H
+++ 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:
[ Direct Link to Message ] | |
|
| |