I've been playing around adding widgets to an Fl_Gl_Window, I'm aware its being work on still. I noticed that passing FL_MULTISAMPLE does provide anti-aliasing on Linux (X11) and MacOS but not on Windows.
#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Gl_Window.H>
#include <FL/Fl_Line_Dial.H>
int main() {
auto win = new Fl_Gl_Window(400, 300);
win->mode(FL_MULTISAMPLE);
win->box(FL_FLAT_BOX);
win->begin();
auto dial = new Fl_Line_Dial(100, 50, 200, 200, "");
dial->selection_color(FL_BLUE);
dial->color(FL_RED);
dial->box(FL_OFLAT_BOX);
win->end();
win->show();
return Fl::run();
}
windows:
Linux (X11):
Also win->mode(FL_OPENGL3 | FL_MULTISAMPLE);
would break antialiasing on MacOS, whereas removing the FL_OPENGL3 fixes it.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.