[MPlayer-cvslog] r36221 - in trunk/libvo: gl_common.c gl_common.h matrixview.c vo_gl.c

reimar subversion at mplayerhq.hu
Sat May 4 17:20:42 CEST 2013


Author: reimar
Date: Sat May  4 17:20:42 2013
New Revision: 36221

Log:
Avoid glColor4f, use glColor4ub instead.

Modified:
   trunk/libvo/gl_common.c
   trunk/libvo/gl_common.h
   trunk/libvo/matrixview.c
   trunk/libvo/vo_gl.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Sat May  4 15:28:14 2013	(r36220)
+++ trunk/libvo/gl_common.c	Sat May  4 17:20:42 2013	(r36221)
@@ -63,7 +63,6 @@ void (GLAPIENTRY *mpglDeleteTextures)(GL
 void (GLAPIENTRY *mpglTexEnvf)(GLenum, GLenum, GLfloat);
 void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint);
 void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
-void (GLAPIENTRY *mpglColor4f)(GLfloat, GLfloat, GLfloat, GLfloat);
 void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
 void (GLAPIENTRY *mpglClearDepth)(double);
 void (GLAPIENTRY *mpglDepthFunc)(GLenum);
@@ -459,7 +458,6 @@ static const extfunc_desc_t extfuncs[] =
   DEF_FUNC_DESC(TexEnvf),
   DEF_FUNC_DESC(TexEnvi),
   DEF_FUNC_DESC(Color4ub),
-  DEF_FUNC_DESC(Color4f),
   DEF_FUNC_DESC(ClearColor),
   DEF_FUNC_DESC(ClearDepth),
   DEF_FUNC_DESC(DepthFunc),

Modified: trunk/libvo/gl_common.h
==============================================================================
--- trunk/libvo/gl_common.h	Sat May  4 15:28:14 2013	(r36220)
+++ trunk/libvo/gl_common.h	Sat May  4 17:20:42 2013	(r36221)
@@ -252,7 +252,6 @@ extern void (GLAPIENTRY *mpglDeleteTextu
 extern void (GLAPIENTRY *mpglTexEnvf)(GLenum, GLenum, GLfloat);
 extern void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint);
 extern void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
-extern void (GLAPIENTRY *mpglColor4f)(GLfloat, GLfloat, GLfloat, GLfloat);
 extern void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
 extern void (GLAPIENTRY *mpglClearDepth)(double);
 extern void (GLAPIENTRY *mpglDepthFunc)(GLenum);

Modified: trunk/libvo/matrixview.c
==============================================================================
--- trunk/libvo/matrixview.c	Sat May  4 15:28:14 2013	(r36220)
+++ trunk/libvo/matrixview.c	Sat May  4 17:20:42 2013	(r36221)
@@ -71,13 +71,13 @@ static void draw_char(int num, float lig
 
     num &= 63;
     //light = light / 255;        //light=7-light;num+=(light*60);
-    light = light / 255 * matrix_brightness;
+    light *= matrix_brightness;
     num2 = num / 10;
     num3 = num - (num2 * 10);
     ty = (float)num2 / 7;
     tx = (float)num3 / 10;
     mpglNormal3f(0.0f, 0.0f, 1.0f);        // Needed for lighting
-    mpglColor4f(0.0, 1.0, 0.0, light);        // Basic polygon color
+    mpglColor4ub(0, 255, 255, light);        // Basic polygon color
 
     mpglTexCoord2f(tx, ty);
     mpglVertex3f(x, y, z);
@@ -99,7 +99,7 @@ static void draw_illuminatedchar(int num
     ty = (float)num2 / 7;
     tx = (float)num3 / 10;
     mpglNormal3f(0.0f, 0.0f, 1.0f);        // Needed for lighting
-    mpglColor4f(1.0, 1.0, 1.0, .5);        // Basic polygon color
+    mpglColor4ub(255, 255, 255, 128);        // Basic polygon color
 
     mpglTexCoord2f(tx, ty);
     mpglVertex3f(x, y, z);
@@ -114,7 +114,7 @@ static void draw_illuminatedchar(int num
 static void draw_flare(float x, float y, float z)        //flare
 {
     mpglNormal3f(0.0f, 0.0f, 1.0f);        // Needed for lighting
-    mpglColor4f(1.0, 1.0, 1.0, .8);        // Basic polygon color
+    mpglColor4ub(255, 255, 255, 204);        // Basic polygon color
 
     mpglTexCoord2f(0, 0);
     mpglVertex3f(x - 1, y + 1, z);

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Sat May  4 15:28:14 2013	(r36220)
+++ trunk/libvo/vo_gl.c	Sat May  4 17:20:42 2013	(r36221)
@@ -899,7 +899,7 @@ static void draw_osd(void)
 }
 
 static void do_render(void) {
-  mpglColor4f(1,1,1,1);
+  mpglColor4ub(255, 255, 255, 255);
   if (is_yuv || is_xyz || custom_prog)
     glEnableYUVConversion(gl_target, yuvconvtype);
   if (stereo_mode) {


More information about the MPlayer-cvslog mailing list