Wayland: fix error detection during call to glewInit().
This commit is contained in:
parent
debbba19ec
commit
6b63516890
@ -200,7 +200,7 @@ int main (int argc, char* argv[])
|
|||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
GLenum err = glewInit(); // defines pters to functions of OpenGL V 1.2 and above
|
GLenum err = glewInit(); // defines pters to functions of OpenGL V 1.2 and above
|
||||||
#ifdef FLTK_USE_WAYLAND
|
#ifdef FLTK_USE_WAYLAND
|
||||||
if (err == GLEW_ERROR_NO_GLX_DISPLAY) err = GLEW_OK;
|
if (fl_wl_display() && err == GLEW_ERROR_NO_GLX_DISPLAY) err = GLEW_OK;
|
||||||
#endif
|
#endif
|
||||||
if (err != GLEW_OK) Fl::error("glewInit() failed returning %u", err);
|
if (err != GLEW_OK) Fl::error("glewInit() failed returning %u", err);
|
||||||
fprintf(stderr, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
fprintf(stderr, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||||
|
@ -149,7 +149,7 @@ public:
|
|||||||
# ifdef FLTK_USE_WAYLAND
|
# ifdef FLTK_USE_WAYLAND
|
||||||
// glewInit returns GLEW_ERROR_NO_GLX_DISPLAY with Wayland
|
// glewInit returns GLEW_ERROR_NO_GLX_DISPLAY with Wayland
|
||||||
// see https://github.com/nigels-com/glew/issues/273
|
// see https://github.com/nigels-com/glew/issues/273
|
||||||
if (err == GLEW_ERROR_NO_GLX_DISPLAY) err = GLEW_OK;
|
if (fl_wl_display() && err == GLEW_ERROR_NO_GLX_DISPLAY) err = GLEW_OK;
|
||||||
# endif
|
# endif
|
||||||
if (err) Fl::warning("glewInit() failed returning %u", err);
|
if (err) Fl::warning("glewInit() failed returning %u", err);
|
||||||
else add_output("Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
else add_output("Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||||
|
Loading…
Reference in New Issue
Block a user