We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43cdaad commit ea8f5e5Copy full SHA for ea8f5e5
main.py
@@ -779,10 +779,11 @@ def set_2d(self):
779
"""
780
width, height = self.get_size()
781
glDisable(GL_DEPTH_TEST)
782
- glViewport(0, 0, width, height)
+ viewport = self.get_viewport_size()
783
+ glViewport(0, 0, max(1, viewport[0]), max(1, viewport[1]))
784
glMatrixMode(GL_PROJECTION)
785
glLoadIdentity()
- glOrtho(0, width, 0, height, -1, 1)
786
+ glOrtho(0, max(1, width), 0, max(1, height), -1, 1)
787
glMatrixMode(GL_MODELVIEW)
788
789
@@ -792,7 +793,8 @@ def set_3d(self):
792
793
794
795
glEnable(GL_DEPTH_TEST)
796
797
798
799
800
gluPerspective(65.0, width / float(height), 0.1, 60.0)
0 commit comments