[MPlayer-cvslog] r34927 - in trunk/libvo: vo_gl.c vo_gl2.c
reimar
subversion at mplayerhq.hu
Sun May 20 17:30:01 CEST 2012
Author: reimar
Date: Sun May 20 17:30:01 2012
New Revision: 34927
Log:
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.
Modified:
trunk/libvo/vo_gl.c
trunk/libvo/vo_gl2.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Sun May 20 11:01:01 2012 (r34926)
+++ trunk/libvo/vo_gl.c Sun May 20 17:30:01 2012 (r34927)
@@ -552,7 +552,7 @@ static int initGl(uint32_t d_width, uint
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 @@ static void do_render_osd(int type) {
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 @@ static void do_render_osd(int type) {
}
// 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);
Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c Sun May 20 11:01:01 2012 (r34926)
+++ trunk/libvo/vo_gl2.c Sun May 20 17:30:01 2012 (r34927)
@@ -272,7 +272,7 @@ static int initTextures(void)
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;
More information about the MPlayer-cvslog
mailing list