[vlc-devel] [PATCH 17/18] caopengllayer: correct vertical alignment
Victorien Le Couviour--Tuffet
victorien.lecouviour.tuffet at gmail.com
Fri Aug 4 19:41:11 CEST 2017
---
modules/video_output/caopengllayer.m | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index a9777c6af9..e303283bc3 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -352,6 +352,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
cfg_tmp.display.width = bounds.size.width;
cfg_tmp.display.height = bounds.size.height;
+ /* Reverse vertical alignment as the GL tex are Y inverted */
+ if (cfg_tmp.align.vertical == VOUT_DISPLAY_ALIGN_TOP)
+ cfg_tmp.align.vertical = VOUT_DISPLAY_ALIGN_BOTTOM;
+ else if (cfg_tmp.align.vertical == VOUT_DISPLAY_ALIGN_BOTTOM)
+ cfg_tmp.align.vertical = VOUT_DISPLAY_ALIGN_TOP;
+
vout_display_place_t place;
vout_display_PlacePicture (&place, source, &cfg_tmp, false);
if (OpenglLock(sys->gl))
--
2.13.1
More information about the vlc-devel
mailing list