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
This commit is contained in:
Manolo Gouy 2018-02-15 07:02:26 +00:00
parent 838168defc
commit 5f553ebd2a
1 changed files with 1 additions and 1 deletions

View File

@ -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);