|  | @@ -39,6 +39,9 @@ public final class Shader
 | 
	
		
			
				|  |  |      private static int unifUseTexture = -1;
 | 
	
		
			
				|  |  |      private static int unifUseColor = -1;
 | 
	
		
			
				|  |  |      private static int unifUseLight = -1;
 | 
	
		
			
				|  |  | +    private static int unifUseMixColor = -1;
 | 
	
		
			
				|  |  | +    private static int unifMixColorLoc = -1;
 | 
	
		
			
				|  |  | +    private static float[] unifMixColor = new float[] {0.0f, 0.0f, 0.0f, 0.0f};
 | 
	
		
			
				|  |  |      
 | 
	
		
			
				|  |  |      protected static void init()
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -75,6 +78,11 @@ public final class Shader
 | 
	
		
			
				|  |  |          unifUseLight = glGetUniformLocation(program, "useLight");
 | 
	
		
			
				|  |  |          setLightEnabled(false);
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  | +        unifUseMixColor = glGetUniformLocation(program, "useMixColor");
 | 
	
		
			
				|  |  | +        setMixColorEnabled(false);
 | 
	
		
			
				|  |  | +        unifMixColorLoc = glGetUniformLocation(program, "mixColor");
 | 
	
		
			
				|  |  | +        setMixColor(0.0f, 0.0f, 0.0f, 0.0f);
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  |          setViewPort(width, height);
 | 
	
		
			
				|  |  |          initDone = true;
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -247,6 +255,20 @@ public final class Shader
 | 
	
		
			
				|  |  |          glUniform1i(unifUseColor, use ? 1 : 0);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      
 | 
	
		
			
				|  |  | +    public static void setMixColorEnabled(boolean use)
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +        glUniform1i(unifUseMixColor, use ? 1 : 0);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    public static void setMixColor(float r, float g, float b, float a)
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +        unifMixColor[0] = r;
 | 
	
		
			
				|  |  | +        unifMixColor[1] = g;
 | 
	
		
			
				|  |  | +        unifMixColor[2] = b;
 | 
	
		
			
				|  |  | +        unifMixColor[3] = a;
 | 
	
		
			
				|  |  | +        glUniform4fv(unifMixColorLoc, unifMixColor);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  |      public static void setLightEnabled(boolean use)
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |          glUniform1i(unifUseLight, use ? 1 : 0);
 |