[vlc-commits] opengl: use shaders for non-flat projection sources

Steve Lhomme git at videolan.org
Wed Nov 16 12:12:17 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Nov 15 10:59:56 2016 +0100| [d584df8dce9f7f8dfd75043501fd249a2e13cfaf] | committer: Thomas Guillem

opengl: use shaders for non-flat projection sources

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/video_output/opengl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 75e4a82..8efe7c9 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -568,6 +568,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     bool need_fs_yuv = false;
     bool need_fs_xyz = false;
     bool need_fs_rgba = USE_OPENGL_ES == 2;
+    bool need_vs = fmt->projection_mode != PROJECTION_MODE_RECTANGULAR;
     float yuv_range_correction = 1.0;
 
     if (max_texture_units >= 3 && supports_shaders && vlc_fourcc_IsYUV(fmt->i_chroma)) {
@@ -632,7 +633,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     vgl->shader[1] =
     vgl->shader[2] = -1;
     vgl->local_count = 0;
-    if (supports_shaders && (need_fs_yuv || need_fs_xyz|| need_fs_rgba)) {
+    if (supports_shaders && (need_vs || need_fs_yuv || need_fs_xyz|| need_fs_rgba)) {
 #ifdef SUPPORTS_SHADERS
         if (need_fs_xyz)
             BuildXYZFragmentShader(vgl, &vgl->shader[0]);



More information about the vlc-commits mailing list