summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Gl_Window.H12
-rw-r--r--documentation/src/opengl.dox6
2 files changed, 9 insertions, 9 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H
index 1d3feec7b..1369b58e8 100644
--- a/FL/Fl_Gl_Window.H
+++ b/FL/Fl_Gl_Window.H
@@ -209,9 +209,9 @@ public:
/** Gives the window width in OpenGL pixels.
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
+ Calls to OpenGL functions expecting pixel values (\em e.g., \c glViewport) should therefore
+ use pixel_w() rather than w().
+ Method pixel_w() 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
*/
@@ -219,9 +219,9 @@ public:
/** Gives the window height in OpenGL pixels.
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
+ Calls to OpenGL functions expecting pixel values (\em e.g., \c glViewport) should therefore
+ use pixel_h() rather than h().
+ Method pixel_h() 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
*/
diff --git a/documentation/src/opengl.dox b/documentation/src/opengl.dox
index b0c6b3d65..35b39e4a7 100644
--- a/documentation/src/opengl.dox
+++ b/documentation/src/opengl.dox
@@ -185,13 +185,13 @@ HighDPI displays (including the so-called 'retina' displays of Apple
hardware) are supported by FLTK in such a way that 1 unit of an FLTK
quantity (say, the value given by Fl_Gl_Window::w()) corresponds to more
than 1 pixel on the display. Conversely, when a program specifies the width and height of the
-OpenGL viewport, it is necessary to use an API that returns quantities expressed in pixels
-as follows:
+OpenGL viewport, it is necessary to use an API that returns quantities expressed in pixels.
+That can be done as follows:
\code
Fl_Gl_Window *glw = ...;
glViewport(0, 0, glw->pixel_w(), glw->pixel_h());
\endcode
-which makes use of the Fl_Gl_Window::pixel_w() and Fl_Gl_Window::pixel_h() functions giving
+which makes use of the Fl_Gl_Window::pixel_w() and Fl_Gl_Window::pixel_h() methods giving
the size in pixels of an Fl_Gl_Window that is potentially mapped to a HighDPI display.
Method Fl_Gl_Window::pixels_per_unit() can also be useful in this context.
\note A further coding rule is necessary to properly support retina displays