if (idCache.length <= lastTexture) { int[] tempCache = new int[lastTexture+2]; System.arraycopy(idCache, 0, tempCache, 0, lastTexture); idCache = tempCache; }
    protected void resetFirstLast() {      boolean foundFirst = false;      for (int x = 0; x < texture.size(); x++) {        if (texture.get(x) != null) {          if (!foundFirst) {            firstTexture = x;            foundFirst = true;          }          lastTexture = x;        }      }    }