Code example for SparseIntArray

Methods: delete, indexOfValue

     * @param glUnused Unused GL object to ensure method is called from GL thread. 
     * @param textureHandle OpenGL texture handle to the texture to be deleted. 
    public void deleteTextureFromGL(GL10 glUnused, int textureHandle) {
        GLES20.glDeleteTextures(0,new int[] {textureHandle},0);
     * Converts an Android color to a 4-element RGBA 
     * @param color integer representing a color (generated by the Color class) 
     * @return 4-element float where every color is in the range 0-1. 
    public static float[] splitColor(int color) {
        float[] res = new float[4];
        res[0] =;
        res[1] =;
        res[2] =;
        res[3] = Color.alpha(color)/255f;
        return res;