summaryrefslogtreecommitdiffstats
path: root/hacks/glx/hypertorus.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-30 16:07:15 +0200
committerSimon Rettberg2019-07-30 16:07:15 +0200
commit813ac136e48f60d4c2b13e808107870dafcc4d52 (patch)
tree396a6c98276f6e9a04216933daebdf3af7b81d46 /hacks/glx/hypertorus.c
parentFlush X events before locking if we have an external ungrab command (diff)
parentUpdate to 5.43 (diff)
downloadxscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.tar.gz
xscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.tar.xz
xscreensaver-813ac136e48f60d4c2b13e808107870dafcc4d52.zip
Merge branch 'master' into openslx (5.43)
Diffstat (limited to 'hacks/glx/hypertorus.c')
-rw-r--r--hacks/glx/hypertorus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hacks/glx/hypertorus.c b/hacks/glx/hypertorus.c
index df64923..8aa8d4d 100644
--- a/hacks/glx/hypertorus.c
+++ b/hacks/glx/hypertorus.c
@@ -736,6 +736,10 @@ static void display_hypertorus(ModeInfo *mi)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
+ /* Let's keep a constant aspect ratio rather than stretching with the
+ shape of the window */
+ glScalef (hp->WindH / (GLfloat) hp->WindW, 1, 1);
+
mi->polygon_count = hypertorus(mi,0.0,2.0*M_PI,0.0,2.0*M_PI,64,64);
}