public void setLayer(int layer) {
        if (this.layer != layer && (this.layer >= 0 || layer >= 0)) {
            this.layer = layer;
            updateFlag = true;
        }
    }
Sets the image layer to bind.
<p>
If the underlying texture is a one/two/three demensional array,
cube map, cube map array, or two demensional multisample array,
then this value specifies which layer of the array to bind.
<p>
default=-1

@param layer layer to bind, or negative to bind all layers
jme3-core/src/main/java/com/jme3/texture/TextureImage.java