public void onTextureUse(Image image, boolean wasSwitched) {
        assert image.getId() >= 1;

        if (!enabled) {
            return;
        }

        if (!texturesUsed.containsKey(image.getId())) {
            texturesUsed.put(image.getId(), null);
        }

        if (wasSwitched) {
            numTextureBinds++;
        }
    }
Called by the Renderer when a texture has been set.

@param image The image that was set
@param wasSwitched If true, the texture has required a state switch
jme3-core/src/main/java/com/jme3/renderer/Statistics.java