From e009e312a3fe525135873cfcd43bb66cf0f6f3b6 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 28 Oct 2013 23:20:17 -0400 Subject: [PATCH] scale to adjust for non-square window size --- source/app.d | 1 + 1 file changed, 1 insertion(+) diff --git a/source/app.d b/source/app.d index 226668b..61b59a3 100644 --- a/source/app.d +++ b/source/app.d @@ -63,6 +63,7 @@ void display(SDL_Window * window) view_matrix.make_identity(); view_matrix.rotatez(SDL_GetTicks() / 500.0); + view_matrix.scale(HEIGHT / cast(float)WIDTH, 1.0, 1.0); glUniformMatrix4fv(view_idx, 1, GL_TRUE, view_matrix.value_ptr); glDrawElements(GL_TRIANGLE_FAN, 4, GL_UNSIGNED_SHORT, null);