Texture t = getTexture(textureUnit); return t != null ? t.getTextureId() : 0;
if(textureUnit >= 0 && textureUnit < numTexUnits && textureUnit < idCache.length) { return idCache[textureUnit]; } else { return 0; }
    public final int getTextureID(int textureUnit) {        Texture t = getTexture(textureUnit);        return t != null ? t.getTextureId() : 0;    }