[vlc-devel] [PATCH] Use glEnable/glDisable with GL_TEXTURE_2D only for fixed pipeline(GLES 1.x)

Gleb Pinigin gpinigin at gmail.com
Mon May 27 10:15:49 CEST 2013


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

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index c9d9df2..735c591 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -948,7 +948,6 @@ static void DrawWithShaders(vout_display_opengl_t *vgl,
         };
         glActiveTexture(GL_TEXTURE0+j);
         glClientActiveTexture(GL_TEXTURE0+j);
-        glEnable(vgl->tex_target);
         glBindTexture(vgl->tex_target, vgl->texture[0][j]);
 
         char attribute[20];
@@ -1022,7 +1021,9 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
 #endif
     }
 
+#ifdef SUPPORTS_FIXED_PIPELINE
     glEnable(GL_TEXTURE_2D);
+#endif
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
@@ -1072,7 +1073,9 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
         }
     }
     glDisable(GL_BLEND);
+#ifdef SUPPORTS_FIXED_PIPELINE
     glDisable(GL_TEXTURE_2D);
+#endif
 
     /* Display */
     vlc_gl_Swap(vgl->gl);
-- 
1.7.12.4 (Apple Git-37)




More information about the vlc-devel mailing list