changeset 36131:08f70b06452c

Provide dummy glColor4ub glTexEnvi functions. Avoids calling a NULL pointer with pure GLES implementations.
author reimar
date Sat, 04 May 2013 15:20:47 +0000
parents df7cb3197862
children 17b5ef08fdaa
files libvo/gl_common.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Sat May 04 15:20:46 2013 +0000
+++ b/libvo/gl_common.c	Sat May 04 15:20:47 2013 +0000
@@ -2365,6 +2365,12 @@
   return res;
 }
 
+static void GLAPIENTRY dummy_color(GLubyte r, GLubyte g, GLubyte b, GLubyte a) {
+}
+
+static void GLAPIENTRY dummy_texenvi(GLenum t, GLenum p, GLint v) {
+}
+
 static int setGlWindow_egl(MPGLContext *ctx)
 {
   static const EGLint cfg_attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE };
@@ -2436,6 +2442,8 @@
   set_frag_src(gpu_def_sl_program, def_frag_shader);
   set_frag_src(gpu_yuv_sl_program, yuv_frag_shader);
   mpglLoadMatrixf = matrix_uniform;
+  mpglColor4ub = dummy_color;
+  mpglTexEnvi = dummy_texenvi;
   use_program(gpu_def_sl_program);
 
   // and inform that reinit is necessary