[MPlayer-cvslog] r34836 - in trunk: Makefile libvo/gl_common.c libvo/video_out.c

reimar subversion at mplayerhq.hu
Sat Mar 31 23:03:45 CEST 2012


Author: reimar
Date: Sat Mar 31 23:03:45 2012
New Revision: 34836

Log:
Small fixes to make it easier to compiler for OpenGL ES
without linking against libGL (which is not used for GL ES).

Modified:
   trunk/Makefile
   trunk/libvo/gl_common.c
   trunk/libvo/video_out.c

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Thu Mar 29 21:10:51 2012	(r34835)
+++ trunk/Makefile	Sat Mar 31 23:03:45 2012	(r34836)
@@ -517,10 +517,10 @@ SRCS_MPLAYER-$(FFMPEG)       += libvo/vo
 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 \

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Thu Mar 29 21:10:51 2012	(r34835)
+++ trunk/libvo/gl_common.c	Sat Mar 31 23:03:45 2012	(r34836)
@@ -499,7 +499,7 @@ static const extfunc_desc_t extfuncs[] =
 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 @@ static void getFunctions(void *(*getProc
 
   // 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);

Modified: trunk/libvo/video_out.c
==============================================================================
--- trunk/libvo/video_out.c	Thu Mar 29 21:10:51 2012	(r34835)
+++ trunk/libvo/video_out.c	Sat Mar 31 23:03:45 2012	(r34836)
@@ -206,6 +206,8 @@ const vo_functions_t* const video_out_dr
 #endif
 #ifdef CONFIG_GL
         &video_out_gl,
+#endif
+#if defined(CONFIG_GL_WIN32) || defined(CONFIG_GL_X11)
         &video_out_gl2,
 #endif
 #ifdef CONFIG_DGA


More information about the MPlayer-cvslog mailing list