[vlc-commits] vout/opengl: remove unused code

Thomas Guillem git at videolan.org
Mon Dec 19 12:06:40 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec 14 13:34:36 2016 +0100| [98fcfec7d76ef023dd338a52310bd0fd712e9542] | committer: Thomas Guillem

vout/opengl: remove unused code

There is no GL_TEXTURE_RECTANGLE_EXT textures anymore.

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

 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 5db728a..66cea5d 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1683,19 +1683,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



More information about the vlc-commits mailing list