[MPlayer-cvslog] CVS: main/libvo vo_gl.c,1.116,1.117

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Mar 26 12:43:58 CEST 2006


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	vo_gl.c 
Log Message:
support custom OSD colour for vo_gl.c


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- vo_gl.c	15 Mar 2006 21:13:13 -0000	1.116
+++ vo_gl.c	26 Mar 2006 10:43:56 -0000	1.117
@@ -55,6 +55,7 @@
 static GLuint osdDispList[MAX_OSD_PARTS];
 //! How many parts the OSD currently consists of
 static int osdtexCnt;
+static int osd_color;
 
 static int use_aspect;
 static int use_yuv;
@@ -251,6 +252,7 @@
   glDisable(GL_CULL_FACE);
   glEnable(gl_target);
   glDrawBuffer(vo_doublebuffering?GL_BACK:GL_FRONT);
+  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
   mp_msg(MSGT_VO, MSGL_V, "[gl] Creating %dx%d texture...\n",
           texture_width, texture_height);
@@ -529,6 +531,7 @@
     glOrtho(0, vo_dwidth, vo_dheight, 0, -1, 1);
     }
     glEnable(GL_BLEND);
+    glColor4ub((osd_color >> 16) & 0xff, (osd_color >> 8) & 0xff, osd_color & 0xff, 0xff);
     // draw OSD
     glCallLists(osdtexCnt, GL_UNSIGNED_INT, osdDispList);
     // set rendering parameters back to defaults
@@ -690,6 +693,7 @@
   {"customprog",   OPT_ARG_MSTRZ,&custom_prog,  NULL},
   {"customtex",    OPT_ARG_MSTRZ,&custom_tex,   NULL},
   {"customtlin",   OPT_ARG_BOOL, &custom_tlin,  NULL},
+  {"osdcolor",     OPT_ARG_INT,  &osd_color,    NULL},
   {NULL}
 };
 
@@ -708,6 +712,7 @@
     custom_prog = NULL;
     custom_tex = NULL;
     custom_tlin = 1;
+    osd_color = 0xffffff;
     if (subopt_parse(arg, subopts) != 0) {
       mp_msg(MSGT_VO, MSGL_FATAL,
               "\n-vo gl command line help:\n"
@@ -744,6 +749,8 @@
               "    use a custom YUV conversion lookup texture\n"
               "  nocustomtlin\n"
               "    use GL_NEAREST scaling for customtex texture\n"
+              "  osdcolor=<0xRRGGBB>\n"
+              "    use the given color for the OSD\n"
               "\n" );
       return -1;
     }




More information about the MPlayer-cvslog mailing list