Problem with light

for some reason my light doesn't work. I press L to see if the light exist at all and it doesn't. my sphere just appears as a solid green color sphere

import com.jme.scene.shape.Quad;
import com.jme.scene.shape.Box;
import com.jme.scene.shape.Sphere;
import com.jme.scene.Node;
import com.jme.scene.state.TextureState;
import com.jme.scene.state.MaterialState;
import com.jme.scene.state.LightState;
import com.jme.math.Vector3f;
import com.jme.util.TextureManager;
import com.jme.image.Texture;
import com.jme.renderer.ColorRGBA;
import com.jme.light.PointLight;
import com.jme.bounding.BoundingBox;
import com.jme.bounding.BoundingSphere;

public class BoxDemo extends SimpleGame
   public static void main(String[] args)
      BoxDemo app = new BoxDemo(); // Create Object
      app.start(); // Start the program
   protected void simpleInitGame()
      URL randomTex;
      TextureState ts=display.getRenderer().createTextureState();
         Texture t =
        MaterialState ms = display.getRenderer().createMaterialState();
         ms.setEmissive(new ColorRGBA(0,0.75f,0,0.5f));
         PointLight l=new PointLight();
         l.setDiffuse(new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f));
         l.setAmbient(new ColorRGBA(0.5f, 0.0f, 0.0f, 1.0f));
         //create a point light at position 10,0,0
         l.setLocation(new Vector3f(10,0,0));
         LightState ls=display.getRenderer().createLightState();
      Sphere b = new Sphere("myquad", 10,10,3);
      b.setModelBound(new BoundingBox());

Interestingly enough i fixed it myself.

I removed these lines:



can anyone explain why the light state never needs to be set?

ah update. didn't appear to fix it. it seems all i did was remove the light i created and instead am now using the default one provided

so. problem still exists :frowning:


oh man. what a method to exist! hahaha im a idiot.

problem fixed.