public void setTexture(Texture texture, int textureUnit) { if(textureUnit >= 0 && textureUnit < numTotalTexUnits) { while(textureUnit >= this.texture.size()) { this.texture.add(null); } this.texture.set(textureUnit, texture); resetFirstLast();
public void setTexture(Texture texture) { if(this.texture.size() == 0) { this.texture.add(texture); } else { this.texture.set(0, texture);
    public void setTexture(Texture texture, int textureUnit) {        if(textureUnit >= 0 && textureUnit < numTotalTexUnits) {            while(textureUnit >= this.texture.size()) {                this.texture.add(null);            }            this.texture.set(textureUnit, texture);            resetFirstLast();        }    }