add and use utility to set Int color as uniform
This commit is contained in:
@@ -167,12 +167,8 @@ public class LineTexRenderer {
|
||||
LineTexLayer ll = (LineTexLayer) l;
|
||||
Line line = ll.line;
|
||||
|
||||
if (line.stippleColor == null)
|
||||
GLES20.glUniform4f(hTexColor, 1.0f, 1.0f, 1.0f, 1.0f);
|
||||
else
|
||||
GLES20.glUniform4fv(hTexColor, 1, line.stippleColor, 0);
|
||||
|
||||
GLES20.glUniform4fv(hBgColor, 1, line.color, 0);
|
||||
GlUtils.setColor(hTexColor, line.stippleColor, 1);
|
||||
GlUtils.setColor(hBgColor, line.color, 1);
|
||||
|
||||
float ps = FastMath.clamp((int) (s+0.5f), 1, 3);
|
||||
GLES20.glUniform1f(hPatternScale, (GLRenderer.COORD_SCALE * line.stipple) / ps);
|
||||
|
||||
@@ -113,13 +113,13 @@ public final class PolygonRenderer {
|
||||
GLState.blend(false);
|
||||
|
||||
if (a.blend == zoom)
|
||||
GlUtils.setBlendColors(hPolygonColor,
|
||||
GlUtils.setColorBlend(hPolygonColor,
|
||||
a.color, a.blendColor, scale - 1.0f);
|
||||
else
|
||||
GlUtils.setColor(hPolygonColor, a.blendColor, 1);
|
||||
|
||||
} else {
|
||||
if (a.color[3] != 1)
|
||||
if (a.color < 0xff000000)
|
||||
GLState.blend(true);
|
||||
else
|
||||
GLState.blend(false);
|
||||
|
||||
Reference in New Issue
Block a user