HomeTexture skyTexture = home.getEnvironment().getSkyTexture();
if (skyTexture != null) {
TextureManager textureManager = TextureManager.getInstance();
if (waitForLoading) {
// Don't share the background texture otherwise if might not be rendered correctly
backgroundAppearance.setTexture(textureManager.loadTexture(skyTexture.getImage()));
} else {
textureManager.loadTexture(skyTexture.getImage(), waitForLoading,
new TextureManager.TextureObserver() {
public void textureUpdated(Texture texture) {
backgroundAppearance.setTexture(texture);