[vlc-commits] opengl: use glEnable when not using shaders
Ilkka Ollakka
git at videolan.org
Sun Jul 1 19:56:13 CEST 2012
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Jul 1 16:55:07 2012 +0300| [016ba929c480c1fd489cac960625536ad87a7a5a] | committer: Ilkka Ollakka
opengl: use glEnable when not using shaders
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=016ba929c480c1fd489cac960625536ad87a7a5a
---
modules/video_output/opengl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 5678192..ec16050 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -794,8 +794,12 @@ static void draw_without_shaders( vout_display_opengl_t *vgl, float *left, float
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glEnable(GL_VERTEX_ARRAY);
+ glEnable(GL_TEXTURE_COORD_ARRAY);
+
vgl->ActiveTexture( GL_TEXTURE0);
vgl->ClientActiveTexture( GL_TEXTURE0);
+
glEnable(vgl->tex_target);
glBindTexture(vgl->tex_target, vgl->texture[0][0]);
glVertexPointer(2, GL_FLOAT, 0, vertexCoord);
@@ -803,9 +807,11 @@ static void draw_without_shaders( vout_display_opengl_t *vgl, float *left, float
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glDisable(vgl->tex_target);
+ glDisable(GL_TEXTURE_COORD_ARRAY);
+ glDisable(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
- glDisable(vgl->tex_target);
}
static void draw_with_shaders( vout_display_opengl_t *vgl, float *left, float *top, float *right, float *bottom )
More information about the vlc-commits
mailing list