try to fix occasional flickering. only seen on nexus with PowerVR

-> clear stencil region by drawing a quad instead of using glClear(stencil) for each tile
This commit is contained in:
Hannes Janetzek
2013-02-04 17:47:56 +01:00
parent fc96e5f6e8
commit a95e7d6f31
3 changed files with 44 additions and 33 deletions

View File

@@ -200,9 +200,13 @@ public class GlUtils {
}
public static void setColor(int handle, float[] c, float alpha) {
if (alpha >= 1)
if (alpha >= 1) {
GLES20.glUniform4fv(handle, 1, c, 0);
else {
} else {
if (alpha < 0) {
Log.d(TAG, "setColor: " + alpha);
alpha = 0;
}
tmpColor[0] = c[0] * alpha;
tmpColor[1] = c[1] * alpha;
tmpColor[2] = c[2] * alpha;