mirror of https://github.com/fltk/fltk
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:
parent
838168defc
commit
5f553ebd2a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue