[vlc-commits] opengl: apply transform matrix on all planes

Romain Vimont git at videolan.org
Thu Feb 13 23:12:41 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Wed Jan 29 11:04:37 2020 +0100| [9a086543cb941654135db5d52382597a6757be74] | committer: Jean-Baptiste Kempf

opengl: apply transform matrix on all planes

The transform matrix provided by Android was applied only on the first
plane.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a086543cb941654135db5d52382597a6757be74
---

 modules/video_output/opengl/vout_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 7697f364bb..55703850ce 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -327,11 +327,11 @@ static GLuint BuildVertexShader(const opengl_tex_converter_t *tc,
     const char *coord1_header = plane_count > 1 ?
         "varying vec2 TexCoord1;\nattribute vec4 MultiTexCoord1;\n" : "";
     const char *coord1_code = plane_count > 1 ?
-        " TexCoord1 = vec4(OrientationMatrix * MultiTexCoord1).st;\n" : "";
+        " TexCoord1 = vec4(TransformMatrix * OrientationMatrix * MultiTexCoord1).st;\n" : "";
     const char *coord2_header = plane_count > 2 ?
         "varying vec2 TexCoord2;\nattribute vec4 MultiTexCoord2;\n" : "";
     const char *coord2_code = plane_count > 2 ?
-        " TexCoord2 = vec4(OrientationMatrix * MultiTexCoord2).st;\n" : "";
+        " TexCoord2 = vec4(TransformMatrix * OrientationMatrix * MultiTexCoord2).st;\n" : "";
 
     char *code;
     if (asprintf(&code, template, tc->glsl_version, coord1_header, coord2_header,



More information about the vlc-commits mailing list