summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Choice.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-08-20 15:12:10 +0000
committerManolo Gouy <Manolo>2018-08-20 15:12:10 +0000
commitc0e04da27f29a989b65958de4deb7566d172bdbe (patch)
tree95ce7015015051e63823cccb0941a16d98bdb7c5 /src/Fl_Gl_Choice.H
parentb26ace4b18be5450c4b3ba248a5c9df08652679d (diff)
Fix creation of OpenGL3+ context under X11 platform
The procedure given in https://www.khronos.org/opengl/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX) is now followed. This gives access to contexts for the highest OpenGL version supported by the hardware when flag FL_OPENGL3 is used in the call to Fl_Gl_Window::mode(int). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13021 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Choice.H')
-rw-r--r--src/Fl_Gl_Choice.H8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fl_Gl_Choice.H b/src/Fl_Gl_Choice.H
index bdee1c6c8..5c5b339ef 100644
--- a/src/Fl_Gl_Choice.H
+++ b/src/Fl_Gl_Choice.H
@@ -3,7 +3,7 @@
//
// OpenGL definitions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -50,9 +50,13 @@
#ifdef FL_CFG_GFX_XLIB
# include <GL/glx.h>
+# if ! defined(GLX_VERSION_1_3)
+# typedef void *GLXFBConfig;
+# endif
# define FL_GL_CHOICE_PLATFORM_SPECIFIC_MEMBERS \
XVisualInfo *vis; /* the visual to use */ \
- Colormap colormap; // a colormap for that visual
+ Colormap colormap; /* a colormap for that visual */ \
+ GLXFBConfig best_fb;
#endif // FL_CFG_GFX_XLIB*/