Skip to content

Commit

Permalink
OpenGL apps need to use Fl_Gl_Window::pixel_w() and pixel_h() when ca…
Browse files Browse the repository at this point in the history
…lling glViewport() to support GUI scaling.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12667 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Feb 15, 2018
1 parent 838168d commit 5f553eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/CubeView.cxx
Expand Up @@ -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);
Expand Down

0 comments on commit 5f553eb

Please sign in to comment.