protected void setFloat(final int location, final float floatValue) {
   runOnDraw(
       new Runnable() {
         @Override
         public void run() {
           GLES20.glUniform1f(location, floatValue);
         }
       });
 }
 protected void setFloatArray(final int location, final float[] arrayValue) {
   runOnDraw(
       new Runnable() {
         @Override
         public void run() {
           GLES20.glUniform1fv(location, arrayValue.length, FloatBuffer.wrap(arrayValue));
         }
       });
 }
 protected void setInteger(final int location, final int intValue) {
   runOnDraw(
       new Runnable() {
         @Override
         public void run() {
           GLES20.glUniform1i(location, intValue);
         }
       });
 }
  protected void setUniformMatrix4f(final int location, final float[] matrix) {
    runOnDraw(
        new Runnable() {

          @Override
          public void run() {
            GLES20.glUniformMatrix4fv(location, 1, false, matrix, 0);
          }
        });
  }
  protected void setPoint(final int location, final PointF point) {
    runOnDraw(
        new Runnable() {

          @Override
          public void run() {
            float[] vec2 = new float[2];
            vec2[0] = point.x;
            vec2[1] = point.y;
            GLES20.glUniform2fv(location, 1, vec2, 0);
          }
        });
  }