diff options
Diffstat (limited to 'video/out/gl_utils.c')
-rw-r--r-- | video/out/gl_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/gl_utils.c b/video/out/gl_utils.c index ca2fef10bf..7881a6cf1f 100644 --- a/video/out/gl_utils.c +++ b/video/out/gl_utils.c @@ -418,7 +418,7 @@ void fbotex_uninit(struct fbotex *fbo) // Standard parallel 2D projection, except y1 < y0 means that the coordinate // system is flipped, not the projection. -void gl_matrix_ortho2d(float m[3][3], float x0, float x1, float y0, float y1) +void gl_matrix_ortho2d(float m[3][2], float x0, float x1, float y0, float y1) { if (y1 < y0) { float t = y0; @@ -426,12 +426,12 @@ void gl_matrix_ortho2d(float m[3][3], float x0, float x1, float y0, float y1) y1 = t; } - memset(m, 0, 9 * sizeof(float)); m[0][0] = 2.0f / (x1 - x0); + m[0][1] = 0.0f; + m[1][0] = 0.0f; m[1][1] = 2.0f / (y1 - y0); m[2][0] = -(x1 + x0) / (x1 - x0); m[2][1] = -(y1 + y0) / (y1 - y0); - m[2][2] = 1.0f; } static void GLAPIENTRY gl_debug_cb(GLenum source, GLenum type, GLuint id, |