summaryrefslogtreecommitdiff
path: root/examples/OpenGL3test.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-04 15:40:29 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-04 15:41:00 +0100
commit3718effc431f5622a23c55b254153efdfe4e72c4 (patch)
treed8a805870c6a3785022e2f52f0c3715410e29a37 /examples/OpenGL3test.cxx
parenta773fdc44bfb818f1830e9e48ba765881e68c942 (diff)
Add the Wayland platform to FLTK 1.4
Diffstat (limited to 'examples/OpenGL3test.cxx')
-rw-r--r--examples/OpenGL3test.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/OpenGL3test.cxx b/examples/OpenGL3test.cxx
index 1b7983529..08c1711a5 100644
--- a/examples/OpenGL3test.cxx
+++ b/examples/OpenGL3test.cxx
@@ -1,7 +1,7 @@
//
// Tiny OpenGL v3 demo program for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2018 by Bill Spitzak and others.
+// Copyright 1998-2022 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
@@ -146,6 +146,11 @@ public:
make_current();
#ifndef __APPLE__
GLenum err = glewInit(); // defines pters to functions of OpenGL V 1.2 and above
+# ifdef FLTK_USE_WAYLAND
+ // glewInit returns GLEW_ERROR_NO_GLX_DISPLAY with Wayland
+ // see https://github.com/nigels-com/glew/issues/273
+ if (err == GLEW_ERROR_NO_GLX_DISPLAY) err = GLEW_OK;
+# endif
if (err) Fl::warning("glewInit() failed returning %u", err);
else add_output("Using GLEW %s\n", glewGetString(GLEW_VERSION));
#endif