summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Gl_Window.H14
-rw-r--r--FL/Fl_Gl_Window_Driver.H2
-rw-r--r--FL/platform_types.h12
3 files changed, 14 insertions, 14 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H
index 11e0cef98..aed24edcd 100644
--- a/FL/Fl_Gl_Window.H
+++ b/FL/Fl_Gl_Window.H
@@ -24,14 +24,6 @@
#include "Fl_Window.H"
-
-#ifndef GLContext
-/**
- Opaque pointer type to hide system specific implementation.
-*/
-typedef void* GLContext; // actually a GLXContext or HGLDC
-#endif
-
class Fl_Gl_Choice; // structure to hold result of glXChooseVisual
class Fl_Gl_Window_Driver;
/**
@@ -201,9 +193,9 @@ public:
*/
int mode(const int *a) {return mode(0, a);}
/** Returns a pointer to the GLContext that this window is using.
- \see void context(void* v, int destroy_flag) */
- void* context() const {return context_;}
- void context(void*, int destroy_flag = 0);
+ \see void context(GLContext c, int destroy_flag) */
+ GLContext context() const {return context_;}
+ void context(GLContext, int destroy_flag = 0);
void make_current();
void swap_buffers();
void ortho();
diff --git a/FL/Fl_Gl_Window_Driver.H b/FL/Fl_Gl_Window_Driver.H
index 99da5408e..35e3f3390 100644
--- a/FL/Fl_Gl_Window_Driver.H
+++ b/FL/Fl_Gl_Window_Driver.H
@@ -88,10 +88,8 @@ public:
#ifdef FL_CFG_GFX_QUARTZ
#ifdef __OBJC__
@class NSOpenGLPixelFormat;
-@class NSOpenGLContext;
#else
class NSOpenGLPixelFormat;
-class NSOpenGLContext;
#endif // __OBJC__
class Fl_Cocoa_Gl_Window_Driver : public Fl_Gl_Window_Driver {
diff --git a/FL/platform_types.h b/FL/platform_types.h
index 17f0ad9ea..e0cd1c373 100644
--- a/FL/platform_types.h
+++ b/FL/platform_types.h
@@ -19,7 +19,7 @@
/* Platform-dependent types are defined here.
These types must be defined by any platform:
- Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, struct dirent, struct stat,
+ Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, GLContext, struct dirent, struct stat,
fl_intptr_t, fl_uintptr_t
NOTE: *FIXME* AlbrechtS 13 Apr 2016 (concerning FL_SOCKET)
@@ -57,6 +57,13 @@ typedef struct CGContext* Fl_Offscreen;
typedef struct CGImage* Fl_Bitmask;
typedef struct flCocoaRegion* Fl_Region;
typedef int FL_SOCKET;
+#ifdef __OBJC__
+ @class NSOpenGLContext;
+ typedef NSOpenGLContext* GLContext;
+#elif defined(__cplusplus)
+ typedef class NSOpenGLContext* GLContext;
+#endif // __OBJC__
+
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
@@ -73,6 +80,7 @@ typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */
# else
typedef int FL_SOCKET;
# endif
+typedef struct HGLRC__ *GLContext;
#include <sys/stat.h>
struct dirent {char d_name[1];};
@@ -82,6 +90,7 @@ typedef void* Fl_Offscreen;
typedef void* Fl_Bitmask;
typedef void *Fl_Region;
typedef int FL_SOCKET;
+typedef void *GLContext;
# pragma message "FL_PORTING: define struct dirent and implement scandir() for the platform"
struct dirent {char d_name[1];};
# pragma message "FL_PORTING: define struct stat and implement stat() for the platform"
@@ -98,6 +107,7 @@ typedef unsigned long Fl_Offscreen;
typedef unsigned long Fl_Bitmask;
typedef struct _XRegion *Fl_Region;
typedef int FL_SOCKET;
+typedef struct __GLXcontextRec *GLContext;
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>