summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-08 19:29:04 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-08 19:29:04 +0000
commit4bc8d91bc99eae37c5c9fdd9455ef4f594d14d34 (patch)
treee58d9db90f166ee2c752315ad3ddbf6f9656ea68 /libvo
parentd031003c4e79305acb09d9d5d26c9210eebc2136 (diff)
downloadmpv-4bc8d91bc99eae37c5c9fdd9455ef4f594d14d34.tar.bz2
mpv-4bc8d91bc99eae37c5c9fdd9455ef4f594d14d34.tar.xz
customtrect -vo gl suboption
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18968 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 8e28af9296..616e27490c 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -84,6 +84,7 @@ static GLuint default_texs[22];
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 @@ static void update_yuvconv(void) {
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 @@ static opt_t subopts[] = {
{"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 @@ static int preinit(const char *arg)
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 @@ static int preinit(const char *arg)
" 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" );