diff options
author | wm4 <wm4@nowhere> | 2016-10-01 16:12:03 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-01 16:12:03 +0200 |
commit | 486b3ce6f839f59f28b7b3d5add92e397b156f95 (patch) | |
tree | e47bb60b59df30f7c85d33c1753469ba6255f0c9 /video/out/opengl | |
parent | 82231fd74d173fb47845dd086d360bceb3e5fc17 (diff) |
vo_opengl: minor simplification
The extra gl_transform_trans() has no apparent use.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/video.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index c3b3660c78..fa170f61c9 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -732,16 +732,15 @@ static int pass_bind(struct gl_video *p, struct img_tex tex) static void get_transform(float w, float h, int rotate, bool flip, struct gl_transform *out_tr) { - struct gl_transform tr = identity_trans; int a = rotate % 90 ? 0 : rotate / 90; int sin90[4] = {0, 1, 0, -1}; // just to avoid rounding issues etc. int cos90[4] = {1, 0, -1, 0}; - struct gl_transform rot = {{{cos90[a], sin90[a]}, {-sin90[a], cos90[a]}}}; - gl_transform_trans(rot, &tr); + struct gl_transform tr = {{{ cos90[a], sin90[a]}, + {-sin90[a], cos90[a]}}}; // basically, recenter to keep the whole image in view float b[2] = {1, 1}; - gl_transform_vec(rot, &b[0], &b[1]); + gl_transform_vec(tr, &b[0], &b[1]); tr.t[0] += b[0] < 0 ? w : 0; tr.t[1] += b[1] < 0 ? h : 0; |