# HG changeset patch # User reimar # Date 1337527801 0 # Node ID 5e29e950d918a50f98ea8085f98f94093ec7649a # Parent 716f2ddf877315596602ca266148ae6d27a489c0 Do not needlessly modulate the texture color with the vertex color. Might give some speedup on not-so-intelligent GL implementations that also have very little compute power. diff -r 716f2ddf8773 -r 5e29e950d918 libvo/vo_gl.c --- a/libvo/vo_gl.c Sun May 20 09:01:01 2012 +0000 +++ b/libvo/vo_gl.c Sun May 20 15:30:01 2012 +0000 @@ -552,7 +552,7 @@ mpglEnable(gl_target); if (mpglDrawBuffer) mpglDrawBuffer(vo_doublebuffering?GL_BACK:GL_FRONT); - mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); mp_msg(MSGT_VO, MSGL_V, "[gl] Creating %dx%d texture...\n", texture_width, texture_height); @@ -805,6 +805,8 @@ mpglPushMatrix(); mpglLoadMatrixf(matrix); } + if (osd_color != 0xffffff) + mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); mpglEnable(GL_BLEND); if (draw_eosd) { mpglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -822,6 +824,8 @@ } // set rendering parameters back to defaults mpglDisable(GL_BLEND); + if (osd_color != 0xffffff) + mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); if (!scaled_osd) mpglPopMatrix(); mpglBindTexture(gl_target, 0); diff -r 716f2ddf8773 -r 5e29e950d918 libvo/vo_gl2.c --- a/libvo/vo_gl2.c Sun May 20 09:01:01 2012 +0000 +++ b/libvo/vo_gl2.c Sun May 20 15:30:01 2012 +0000 @@ -272,7 +272,7 @@ glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR, texture_width, texture_height, 0); - glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); if (is_yuv) { int xs, ys, depth; int chroma_clear_val = 128;