[vlc-devel] [PATCH 03/11] vout/opengl: remove unused code

Thomas Guillem thomas at gllm.fr
Wed Dec 14 17:16:08 CET 2016


There is no GL_TEXTURE_RECTANGLE_EXT textures anymore.
---
 modules/video_output/opengl/vout_helper.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 4846cab..f3a249f 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1705,19 +1705,13 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
     float top[PICTURE_PLANE_MAX];
     float right[PICTURE_PLANE_MAX];
     float bottom[PICTURE_PLANE_MAX];
-    for (unsigned j = 0; j < vgl->chroma->plane_count; j++) {
-        /* glTexCoord works differently with GL_TEXTURE_2D and
-           GL_TEXTURE_RECTANGLE_EXT */
-        float scale_w, scale_h;
-
-        if (vgl->tex_target == GL_TEXTURE_2D) {
-            scale_w = (float)vgl->chroma->p[j].w.num / vgl->chroma->p[j].w.den / vgl->tex_width[j];
-            scale_h = (float)vgl->chroma->p[j].h.num / vgl->chroma->p[j].h.den / vgl->tex_height[j];
+    for (unsigned j = 0; j < vgl->chroma->plane_count; j++)
+    {
+        float scale_w = (float)vgl->chroma->p[j].w.num / vgl->chroma->p[j].w.den
+                      / vgl->tex_width[j];
+        float scale_h = (float)vgl->chroma->p[j].h.num / vgl->chroma->p[j].h.den
+                      / vgl->tex_height[j];
 
-        } else {
-            scale_w = 1.0;
-            scale_h = 1.0;
-        }
         /* Warning: if NPOT is not supported a larger texture is
            allocated. This will cause right and bottom coordinates to
            land on the edge of two texels with the texels to the
-- 
2.10.2



More information about the vlc-devel mailing list