summaryrefslogtreecommitdiffstats
path: root/hacks/glx/hypertorus.c
diff options
context:
space:
mode:
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);
}