[vlc-commits] opengl: add vout_display_opengl_Viewport

Thomas Guillem git at videolan.org
Thu Dec 7 09:28:06 CET 2017


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec  6 14:22:59 2017 +0100| [4bbcb092193f7ae7d43bfba8d8c2f647d43eff75] | committer: Thomas Guillem

opengl: add vout_display_opengl_Viewport

In order to use glViewport from the vgl vtable.

Refs #19093

(cherry picked from commit fad8b0b466f5915bd30eb8d2424720363034df13)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/video_output/opengl/vout_helper.c | 6 ++++++
 modules/video_output/opengl/vout_helper.h | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index c220e42c44..9004e2c20f 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1076,6 +1076,12 @@ void vout_display_opengl_SetWindowAspectRatio(vout_display_opengl_t *vgl,
     getViewpointMatrixes(vgl, vgl->fmt.projection_mode, vgl->prgm);
 }
 
+void vout_display_opengl_Viewport(vout_display_opengl_t *vgl, int x, int y,
+                                  unsigned width, unsigned height)
+{
+    vgl->vt.Viewport(x, y, width, height);
+}
+
 picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned requested_count)
 {
     GL_ASSERT_NOERROR();
diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h
index ea7266b2ac..666dd79291 100644
--- a/modules/video_output/opengl/vout_helper.h
+++ b/modules/video_output/opengl/vout_helper.h
@@ -96,6 +96,9 @@ int vout_display_opengl_SetViewpoint(vout_display_opengl_t *vgl, const vlc_viewp
 void vout_display_opengl_SetWindowAspectRatio(vout_display_opengl_t *vgl,
                                               float f_sar);
 
+void vout_display_opengl_Viewport(vout_display_opengl_t *vgl, int x, int y,
+                                  unsigned width, unsigned height);
+
 int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
                                 picture_t *picture, subpicture_t *subpicture);
 int vout_display_opengl_Display(vout_display_opengl_t *vgl,



More information about the vlc-commits mailing list