diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-28 17:06:00 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-28 17:06:00 +0200 |
| commit | c2efb0d8494b101d9700afc79302fcf371995a6e (patch) | |
| tree | bd18b6ba6d706e2cd638a45fee43dce61a92af60 /examples/OpenGL3test.cxx | |
| parent | 7d58e2385452b8373448e3f91013a8cda39c7aa3 (diff) | |
macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.
This code is OK under macOS 10 9 and 13.
Diffstat (limited to 'examples/OpenGL3test.cxx')
| -rw-r--r-- | examples/OpenGL3test.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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"); |
