summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-20 21:37:18 +0200
committerwm4 <wm4@nowhere>2014-04-21 02:57:16 +0200
commit7791b5cf7c8ee6300ce1b6994ea6b91c7d3f4577 (patch)
tree7ed796f48d9f1b0e0a8156e1aadee0c172269b6a /video/out/vo_opengl.c
parentef2885e771d184ff39c688836a8f06595a6cdf86 (diff)
downloadmpv-7791b5cf7c8ee6300ce1b6994ea6b91c7d3f4577.tar.bz2
mpv-7791b5cf7c8ee6300ce1b6994ea6b91c7d3f4577.tar.xz
vo_opengl: support rotation
This turned out much more complicated than I thought. It's not just a matter of adjusting the texture coordinates, but you also have to consider separated scaling and panscan clipping, which make everything complicated. This actually still doesn't clip 100% correctly, but the bug is only visible when rotating (or flipping with --vf=flip), and using something like --video-pan-x/y at the same time.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index c243cdeb85..60ecb885fc 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -464,9 +464,12 @@ const struct m_option options[] = {
{0},
};
+#define CAPS VO_CAP_ROTATE90
+
const struct vo_driver video_out_opengl = {
.description = "Extended OpenGL Renderer",
.name = "opengl",
+ .caps = CAPS,
.preinit = preinit,
.query_format = query_format,
.reconfig = reconfig,
@@ -482,6 +485,7 @@ const struct vo_driver video_out_opengl = {
const struct vo_driver video_out_opengl_hq = {
.description = "Extended OpenGL Renderer (high quality rendering preset)",
.name = "opengl-hq",
+ .caps = CAPS,
.preinit = preinit,
.query_format = query_format,
.reconfig = reconfig,