[MPlayer-cvslog] r36225 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Sat May 4 17:20:47 CEST 2013


Author: reimar
Date: Sat May  4 17:20:47 2013
New Revision: 36225

Log:
Provide dummy glColor4ub glTexEnvi functions.

Avoids calling a NULL pointer with pure GLES implementations.

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Sat May  4 17:20:46 2013	(r36224)
+++ trunk/libvo/gl_common.c	Sat May  4 17:20:47 2013	(r36225)
@@ -2365,6 +2365,12 @@ static void *eglgpa(const GLubyte *name)
   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 @@ static int setGlWindow_egl(MPGLContext *
   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


More information about the MPlayer-cvslog mailing list