summaryrefslogtreecommitdiff
path: root/FL/Fl_Gl_Window.H
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-12 18:47:42 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-12 18:47:42 +0200
commitf55729ed325b8f888ce17b778a1f063fc2a2e220 (patch)
tree6deb69a7b60b29fe7e4e46dde3f766675fa09038 /FL/Fl_Gl_Window.H
parent4abaeba539fea5aaa73c4a298393f847623eec75 (diff)
Doxygen: describe better support for OpenGL on HighDPI displays.
Diffstat (limited to 'FL/Fl_Gl_Window.H')
-rw-r--r--FL/Fl_Gl_Window.H16
1 files changed, 10 insertions, 6 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H
index 48b7d39b0..f7574496a 100644
--- a/FL/Fl_Gl_Window.H
+++ b/FL/Fl_Gl_Window.H
@@ -208,17 +208,21 @@ public:
float pixels_per_unit();
/** Gives the window width in OpenGL pixels.
- Generally identical with the result of the w() function, but for a window mapped to
- an Apple 'retina' display, and if Fl::use_high_res_GL(bool) is set to true,
- pixel_w() returns 2 * w(). This method detects when the window has been moved
+ When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::w()
+ which is expressed in FLTK units, may differ from the window width in pixels.
+ Calls to OpenGL functions expecting pixel values (e.g., glViewport) must therefore
+ use this method rather than method w().
+ This method detects when the GUI is rescaled or when the window has been moved
between low and high resolution displays and automatically adjusts the returned value.
\version 1.3.4
*/
int pixel_w() { return int(pixels_per_unit() * w() + 0.5f); }
/** Gives the window height in OpenGL pixels.
- Generally identical with the result of the h() function, but for a window mapped to
- an Apple 'retina' display, and if Fl::use_high_res_GL(bool) is set to true,
- pixel_h() returns 2 * h(). This method detects when the window has been moved
+ When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::h()
+ which is expressed in FLTK units, may differ from the window height in pixels.
+ Calls to OpenGL functions expecting pixel values (e.g., glViewport) must therefore
+ use this method rather than method h().
+ This method detects when the GUI is rescaled or when the window has been moved
between low and high resolution displays and automatically adjusts the returned value.
\version 1.3.4
*/