Created
April 24, 2013 22:19
-
-
Save TranquilMarmot/5456079 to your computer and use it in GitHub Desktop.
What in sam hill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setColor (float r, float g, float b, float a) { | |
int intBits = ((int)(255 * a) << 24) | ((int)(255 * b) << 16) | ((int)(255 * g) << 8) | ((int)(255 * r)); | |
float color = NumberUtils.intToFloatColor(intBits); | |
if (color == this.color) return; | |
this.color = color; | |
float[] vertices = this.vertices; | |
for (int i = 2, n = idx; i < n; i += 5) | |
vertices[i] = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment