changeset 34748:f86e300072f0

Small fixes to make it easier to compiler for OpenGL ES without linking against libGL (which is not used for GL ES).
author reimar
date Sat, 31 Mar 2012 21:03:45 +0000
parents d1be55e3bd2c
children 45a8184e4b22
files Makefile libvo/gl_common.c libvo/video_out.c
diffstat 3 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 \
--- 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);
--- 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