From c2efb0d8494b101d9700afc79302fcf371995a6e Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:06:00 +0200 Subject: macOS: support of FLTK widgets in OpenGL 3 windows - cont'd. This code is OK under macOS 10 9 and 13. --- examples/OpenGL3test.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/OpenGL3test.cxx b/examples/OpenGL3test.cxx index edcb56d93..40d0bf74e 100644 --- a/examples/OpenGL3test.cxx +++ b/examples/OpenGL3test.cxx @@ -191,8 +191,10 @@ void toggle_double(Fl_Widget *wid, void *data) { SimpleGL3Window *glwin = (SimpleGL3Window*)data; int flags = glwin->mode(); if (doublebuff) flags |= FL_DOUBLE; else flags &= ~FL_DOUBLE; - glwin->mode(flags); glwin->reset(); + glwin->hide(); + glwin->mode(flags); + glwin->show(); } @@ -227,7 +229,7 @@ void button_cb(Fl_Widget *, void *) { } void add_widgets(Fl_Gl_Window *g) { - Fl::set_color(FL_FREE_COLOR, 255, 0, 0, 140); // partially transparent red + Fl::set_color(FL_FREE_COLOR, 255, 255, 255, 140); // partially transparent white g->begin(); // Create here widgets to go above the GL3 scene Fl_Button* b = new Fl_Button( 0, 170, 60, 30, "button"); -- cgit v1.2.3