FLTK logo

[master] 4f6965d - Support of FLTK widgets in OpenGL 3 windows under Windows.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 4f6965d - Support of FLTK widgets in OpenGL 3 windows under Windows. "ManoloFLTK" Sep 30, 2022  
 
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 ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.