# HG changeset patch # User reimar # Date 1367680847 0 # Node ID 08f70b06452ca9053724a6b24627a899298204a1 # Parent df7cb319786288803605cc96224a2987196461e7 Provide dummy glColor4ub glTexEnvi functions. Avoids calling a NULL pointer with pure GLES implementations. diff -r df7cb3197862 -r 08f70b06452c libvo/gl_common.c --- 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