summaryrefslogtreecommitdiffstats
path: root/hacks/glx/hypertorus.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-30 16:03:58 +0200
committerSimon Rettberg2019-07-30 16:03:58 +0200
commit6a32252403781b303d4ebd195932ce39c5b1c08e (patch)
treecd2f8b3c4052c1b575caf33c9983ae531fad9092 /hacks/glx/hypertorus.c
parentRemove android and OSX files (diff)
downloadxscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.tar.gz
xscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.tar.xz
xscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.zip
Update to 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);
}