I cannot believe it, I used Skybox like 20 times at least and now I cannot get it right:
private void buildSkyBox() {
skybox = new Skybox("skybox", 10, 10, 10);
skybox.setTexture(Skybox.NORTH, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/1.dds"), false));
skybox.setTexture(Skybox.WEST, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/4.dds"), false));
skybox.setTexture(Skybox.SOUTH, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/3.dds"), false));
skybox.setTexture(Skybox.EAST, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/2.dds"), false));
skybox.setTexture(Skybox.UP, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/6.dds"), false));
skybox.setTexture(Skybox.DOWN, TaskQueueUtil.loadImage(getClass().getClassLoader().getResource(
game.getName().toLowerCase() + "/content3d/skybox/5.dds"), false));
GameTaskQueueManager.getManager().getQueue(GameTaskQueue.RENDER).enqueue(new Callable<Object>() {
public Object call() throws Exception {
skybox.preloadTextures();
return null;
} // call
}); // update
skybox.updateRenderState();
modelRootNode.attachChild(skybox);
modelRootNode.updateRenderState();
} // buildSkyBox
The Skybox is where I want it to be and behaves perfectly like a good Skybox should, except it won't show my textures and just remains white.
I don't have a Light in my scene, everything is
bla.setLightCombineMode(LightState.OFF);
Excerpt from TaskQueueUtil:
public static Texture loadImage(final URL path, final boolean flipped) {
Future<Texture> future = GameTaskQueueManager.getManager().update(new Callable<Texture>() {
public Texture call() throws Exception {
Texture t = TextureManager.loadTexture(path, flipped);
t.setFilter(Texture.FM_LINEAR);
t.setMipmapState(Texture.MM_LINEAR_LINEAR);
t.setAnisoLevel(1.0f);
return t;
} // call()
}); // Callable
try {
return future.get();
} catch(InterruptedException e) {
e.printStackTrace();
} catch(ExecutionException e) {
e.printStackTrace();
} // catch
return null; // should not happen
} // loadImage
I tried skybox.preloadTextures();
I tried other textures that are correctly loaded in other parts of the scene.
I searched the forums for hours now.
I'm at the end of my whits.
Please help, so long,
Andy