diff options
| author | Manolo Gouy <Manolo> | 2018-02-15 07:02:26 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-02-15 07:02:26 +0000 |
| commit | 5f553ebd2a301e6019de9dc4c10d7125d19d2bcd (patch) | |
| tree | e9329ef4785f90797f3f34255a7de91d1d1197e2 | |
| parent | 838168defc0a126af6333c5172159a6b44748385 (diff) | |
OpenGL apps need to use Fl_Gl_Window::pixel_w() and pixel_h() when calling glViewport() to support GUI scaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12667 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | test/CubeView.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CubeView.cxx b/test/CubeView.cxx index 7a26ff186..5e153c675 100644 --- a/test/CubeView.cxx +++ b/test/CubeView.cxx @@ -139,7 +139,7 @@ void CubeView::drawCube() { void CubeView::draw() { if (!valid()) { glLoadIdentity(); - glViewport(0,0,w(),h()); + glViewport(0,0,pixel_w(),pixel_h()); glOrtho(-10,10,-10,10,-20050,10000); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
