diff libvo/matrixview.c @ 36127:18c289284727

Avoid glColor4f, use glColor4ub instead.
author reimar
date Sat, 04 May 2013 15:20:42 +0000
parents 3be8afb83629
children 4129ba181ad7
line wrap: on
line diff
--- a/libvo/matrixview.c	Sat May 04 13:28:14 2013 +0000
+++ b/libvo/matrixview.c	Sat May 04 15:20:42 2013 +0000
@@ -71,13 +71,13 @@
 
     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 @@
     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_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);