|
|
with FLTK 1.4
consider followed code.
#include <FL/Fl.H>
#include <FL/Fl_Gl_Window.H>
int main() {
Fl::use_high_res_GL(1);
// auto win = new Fl_Gl_Window(400, 300);
auto win = new Fl_Gl_Window(0, 0, 400, 300, "title");
win->end();
win->show();
// win->make_current();
printf("%f\n", Fl::screen_scale(win->screen_num()));
printf("%f\n", win->pixels_per_unit());
printf("%d\n", win->pixel_w());
printf("%d\n", win->pixel_h());
return Fl::run();
}
if use Fl_Gl_Window(x, y, w, h, title);
pixels_per_unit() return 1 on macOS with retina display.
pixel_w() and pixel_h() not retina size.
but in windows it works fine.
if use new Fl_Gl_Window(w, h), pixels_per_unit() return 2.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
[ Direct Link to Message ] | |
|
| |