# HG changeset patch # User reimar # Date 1333227825 0 # Node ID f86e300072f095f67a1694fe2f58ca885c5cfb4b # Parent d1be55e3bd2c2e3a219ee9bd13c5c5d2468efc80 Small fixes to make it easier to compiler for OpenGL ES without linking against libGL (which is not used for GL ES). diff -r d1be55e3bd2c -r f86e300072f0 Makefile --- a/Makefile Thu Mar 29 19:10:51 2012 +0000 +++ b/Makefile Sat Mar 31 21:03:45 2012 +0000 @@ -517,10 +517,10 @@ SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \ - libvo/vo_gl2.c libvo/csputils.c + libvo/csputils.c SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c -SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c -SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c +SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c libvo/vo_gl2.c +SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c libvo/vo_gl2.c SRCS_MPLAYER-$(MATRIXVIEW) += libvo/vo_matrixview.c libvo/matrixview.c SRCS_MPLAYER-$(GUI) += gui/util/bitmap.c \ gui/util/list.c \ diff -r d1be55e3bd2c -r f86e300072f0 libvo/gl_common.c --- a/libvo/gl_common.c Thu Mar 29 19:10:51 2012 +0000 +++ b/libvo/gl_common.c Sat Mar 31 21:03:45 2012 +0000 @@ -499,7 +499,7 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *), const char *ext2) { const extfunc_desc_t *dsc; - const char *extensions; + const char *extensions = NULL; char *allexts; if (!getProcAddress) @@ -507,10 +507,13 @@ // special case, we need glGetString before starting to find the other functions mpglGetString = getProcAddress("glGetString"); +#if defined(CONFIG_GL_WIN32) || defined(CONFIG_GL_X11) if (!mpglGetString) mpglGetString = glGetString; +#endif - extensions = (const char *)mpglGetString(GL_EXTENSIONS); + if (mpglGetString) + extensions = (const char *)mpglGetString(GL_EXTENSIONS); if (!extensions) extensions = ""; if (!ext2) ext2 = ""; allexts = malloc(strlen(extensions) + strlen(ext2) + 2); diff -r d1be55e3bd2c -r f86e300072f0 libvo/video_out.c --- a/libvo/video_out.c Thu Mar 29 19:10:51 2012 +0000 +++ b/libvo/video_out.c Sat Mar 31 21:03:45 2012 +0000 @@ -206,6 +206,8 @@ #endif #ifdef CONFIG_GL &video_out_gl, +#endif +#if defined(CONFIG_GL_WIN32) || defined(CONFIG_GL_X11) &video_out_gl2, #endif #ifdef CONFIG_DGA