I'm trying to add a SkyDome in a standardagme.
Here is the code of a gameState with only the skydome.
package druidus.client.game.state;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import com.jme.bounding.BoundingSphere;
import com.jme.math.Vector3f;
import com.jme.renderer.Renderer;
import com.jme.scene.Node;
import com.jme.scene.state.LightState;
import com.jme.system.DisplaySystem;
import com.jme.util.GameTaskQueueManager;
import com.jmex.game.state.GameState;
import druidus.client.data.land.SkyDome;
import druidus.client.game.GSET;
public class SkyState extends GameState {
private Node rootNode = new Node("sky_rootnode");
private SkyDome ciel;
public SkyState(){
initSky();
rootNode.attachChild(ciel);
rootNode.updateRenderState();
rootNode.updateGeometricState(0.0f, true);
rootNode.setRenderQueueMode(Renderer.QUEUE_ORTHO);
rootNode.updateGeometricState(0.0f, true);
rootNode.updateRenderState();
}
private void initSky(){
Future<SkyDome> future = GameTaskQueueManager.getManager().update(new Callable<SkyDome>(){
public SkyDome call() throws Exception{
LightState ls = GSET.GAME.getDisplay().getRenderer().createLightState();
ls.detachAll();
ls.setTwoSidedLighting(true);
ciel = new SkyDome("skyDome", new Vector3f(0.0f, 0.0f, 0.0f), 11, 18, 850.0f);
ciel.setModelBound(new BoundingSphere());
ciel.updateModelBound();
ciel.updateRenderState();
ciel.setUpdateTime(0.1f); // initial 5f
ciel.setTimeWarp(500.0f);
ciel.setDay(264);
ciel.setLatitude(-22.9f);
ciel.setLongitude(-47.083f);
ciel.setStandardMeridian(-45.0f);
ciel.setSunPosition(5.75f); // initial 5.75f 5:45 am
ciel.setTurbidity(2f); // initial 1f
ciel.setSunEnabled(true);
ciel.setExposure(true, 18.0f);
ciel.setOvercastFactor(0.0f);
ciel.setGammaCorrection(2.5f); // initial 2.5f
ciel.setRootNode(rootNode);
ciel.setIntensity(0.75f);
// setup a target to LightNode, if you dont want terrain with
// light's
// effect remove it.
ciel.setTarget(rootNode);
ciel.setLocalTranslation(new Vector3f(0f, -50f, 0f));
ciel.updateGeometricState(0f, true);
ciel.updateRenderState();
rootNode.attachChild(ciel);
return ciel;
}
});
try{
ciel = future.get();
}
catch( Exception e ){
System.out.println(e);
}
}
@Override
public void cleanup() {
// TODO Auto-generated method stub
}
@Override
public void render(float tpf) {
// TODO Auto-generated method stub
//ciel.render();
DisplaySystem.getDisplaySystem().getRenderer().draw(rootNode);
//DisplaySystem.getDisplaySystem().getRenderer().draw(ciel);
}
@Override
public void update(float tpf) {
// TODO Auto-generated method stub
ciel.updateGeometricState(tpf, true);
rootNode.updateGeometricState(tpf, true);
}
}
we can only see a thin line on the right.

I certainly AGAIN forgot a little something......
help, 2days allready i'm searching why