So I found partial solution to this. I created this TextureStreamLocator
public class PackageTextureStreamLocator implements TextureStreamLocator {
public PackageTextureStreamLocator() {
super();
}
public InputStream openTextureStream(String name) {
return this.getClass().getClassLoader().getResourceAsStream(name);
}
public String getBaseDirName() {
// TODO Auto-generated method stub
return null;
}
}
First of all I didn't implement get Base Dir Name, since I don't know what this is suppose to return. If anyone can tell me I'd be much obliged to them.
Second, all though this properly loads the textures something else is wrong with my code. When I disable lighting they show up fine, however when I turn lighting back on, it looks as though the textures aren't there, or the lights no longer work.
I add the lights like so
AmbientLightControl ambientLightNode = new AmbientLightControl(new Color3f(.1f, .1f, .1f));
root.addChild(ambientLightNode);
DirectionalLightControl directionalLight = new DirectionalLightControl(true,new Color3f(.8f,.8f,.8f),new Vector3f(1f,-2f,1f));
root.addChild(directionalLight);
PointLightControl pointLight = new PointLightControl(true, new Color3f(.7f,.7f,.7f),new Point3f(10f,20f,10f), new Point3f(.01f,.01f,.01f));
root.addChild(pointLight);
I then enable lighting like so
RenderOptions options = new RenderOptions();
//options.setOption(Option.USE_SHADOWS,true);
options.setOption(Option.USE_LIGHTING,true);
window.getCanvasPeer().setRenderOptions(options);
Note that window.getCanvasPeer() returns the CanvasPeer.
Does anyone know why my lighting doesn't work?