# HG changeset patch # User reimar # Date 1152386944 0 # Node ID 50ded49812b9a88ec372ffee24849eb87796d594 # Parent 9beb5426b3ca7b900ecce2b36f65f38ca1e51e38 customtrect -vo gl suboption diff -r 9beb5426b3ca -r 50ded49812b9 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Sat Jul 08 19:26:53 2006 +0000 +++ b/DOCS/man/en/mplayer.1 Sat Jul 08 19:29:04 2006 +0000 @@ -3146,6 +3146,9 @@ .IPs (no)customtlin If enabled (default) use GL_LINEAR interpolation, otherwise use GL_NEAREST for customtex texture. +.IPs (no)customtrect +If enabled, use texture_rectangle for customtex texture. +Default is disabled. .REss .RE .PD 1 diff -r 9beb5426b3ca -r 50ded49812b9 libvo/vo_gl.c --- a/libvo/vo_gl.c Sat Jul 08 19:26:53 2006 +0000 +++ b/libvo/vo_gl.c Sat Jul 08 19:29:04 2006 +0000 @@ -84,6 +84,7 @@ static char *custom_prog; static char *custom_tex; static int custom_tlin; +static int custom_trect; static int int_pause; static int eq_bri = 0; @@ -188,7 +189,7 @@ else { int width, height, maxval; ActiveTexture(GL_TEXTURE3); - if (glCreatePPMTex(GL_TEXTURE_2D, 3, + if (glCreatePPMTex(custom_trect?GL_TEXTURE_RECTANGLE:GL_TEXTURE_2D, 0, custom_tlin?GL_LINEAR:GL_NEAREST, f, &width, &height, &maxval)) ProgramEnvParameter4f(GL_FRAGMENT_PROGRAM, 1, @@ -706,6 +707,7 @@ {"customprog", OPT_ARG_MSTRZ,&custom_prog, NULL}, {"customtex", OPT_ARG_MSTRZ,&custom_tex, NULL}, {"customtlin", OPT_ARG_BOOL, &custom_tlin, NULL}, + {"customtrect", OPT_ARG_BOOL, &custom_trect, NULL}, {"osdcolor", OPT_ARG_INT, &osd_color, NULL}, {NULL} }; @@ -727,6 +729,7 @@ custom_prog = NULL; custom_tex = NULL; custom_tlin = 1; + custom_trect = 0; osd_color = 0xffffff; if (subopt_parse(arg, subopts) != 0) { mp_msg(MSGT_VO, MSGL_FATAL, @@ -769,6 +772,8 @@ " use a custom YUV conversion lookup texture\n" " nocustomtlin\n" " use GL_NEAREST scaling for customtex texture\n" + " customtrect\n" + " use texture_rectangle for customtex texture\n" " osdcolor=<0xRRGGBB>\n" " use the given color for the OSD\n" "\n" );