[Mplayer-cvslog] CVS: main/libvo vo_gl2.c,1.46,1.47

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Jul 2 18:18:26 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv25279

Modified Files:
	vo_gl2.c 
Log Message:
removed XFlush() before XSync(), made config_glx return type signed.


Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- vo_gl2.c	27 Jun 2004 20:45:08 -0000	1.46
+++ vo_gl2.c	2 Jul 2004 16:18:24 -0000	1.47
@@ -41,7 +41,12 @@
 #define NDEBUG
 //#undef NDEBUG
 
-#undef TEXTUREFORMAT_ALWAYS_RGB24
+#undef TEXTUREFORMAT_ALWAYS
+#undef TEXTUREFORMAT_ALWAYS_S
+#ifdef SYS_DARWIN
+#define TEXTUREFORMAT_ALWAYS GL_RGB8
+#define TEXTUREFORMAT_ALWAYS_S "GL_RGB8"
+#endif
 
 static vo_info_t info = 
 {
@@ -662,7 +667,7 @@
 	return (best_weight < 1000000) ? 0 : -1;
 }
 
-static uint32_t config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) {
+static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) {
 	XSizeHints hint;
 	XVisualInfo *vinfo, vinfo_buf;
 	XEvent xev;
@@ -740,7 +745,6 @@
 
         glXMakeCurrent( mDisplay,vo_window,wsGLXContext );
 
-	XFlush(mDisplay);
 	XSync(mDisplay, False);
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!
@@ -761,7 +765,7 @@
 }
 
 #ifdef HAVE_NEW_GUI
-static uint32_t config_glx_gui(uint32_t d_width, uint32_t d_height) {
+static int config_glx_gui(uint32_t d_width, uint32_t d_height) {
   XWindowAttributes xw_attr;
   XVisualInfo *vinfo, vinfo_template;
   int tmp;
@@ -780,7 +784,6 @@
     return -1;
   }
   glXMakeCurrent( mDisplay,vo_window,wsGLXContext );
-  XFlush(mDisplay);
   XSync(mDisplay, False);
 
   if (glXGetConfig(mDisplay,vinfo,GLX_RED_SIZE, &r_sz) != 0) r_sz = 0;
@@ -941,9 +944,9 @@
 	  gl_internal_format_s="GL_RGB";
   }
 
-#ifdef TEXTUREFORMAT_ALWAYS_RGB24
-  gl_internal_format=GL_RGB8;
-  gl_internal_format_s="GL_RGB8";
+#ifdef TEXTUREFORMAT_ALWAYS
+  gl_internal_format=TEXTURE_FORMAT_ALWAYS;
+  gl_internal_format_s=TEXTURE_FORMAT_ALWAYS_S;
 #endif
 
   if (IMGFMT_IS_BGR(format))
@@ -1156,10 +1159,14 @@
 query_format(uint32_t format)
 {
     switch(format){
+#ifdef SYS_DARWIN
+    case IMGFMT_RGB32:
+#else
     case IMGFMT_RGB24:
     case IMGFMT_BGR24:
 //    case IMGFMT_RGB32:
 //    case IMGFMT_BGR32:
+#endif
         return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD;
     }
     return 0;




More information about the MPlayer-cvslog mailing list