Hi everybody!
I got this exception after running these commands:
rootNode.attachChild(new Line()); and rootNode.attachChild(new Point());
SEVERE: Exception in game loop
java.lang.NullPointerException
at com.jme.renderer.lwjgl.LWJGLRenderer.draw(LWJGLRenderer.java:768)
at com.jme.scene.batch.LineBatch.draw(LineBatch.java:241)
at com.jme.scene.Line.draw(Line.java:403)
at com.jme.scene.Spatial.onDraw(Spatial.java:252)
at com.jme.scene.Node.draw(Node.java:504)
at com.jme.scene.Spatial.onDraw(Spatial.java:252)
at com.jme.renderer.lwjgl.LWJGLRenderer.draw(LWJGLRenderer.java:1127)
at com.jme.app.SimpleGame.render(SimpleGame.java:92)
at com.jme.app.BaseGame.start(BaseGame.java:82)
at Game.main(Game.java:24)
Could anyone help me?
Thanks!
you can't use the default constructor without further initializing the object.
try:
new com.jme.scene.Line("grid", vertices, null,
null, null) {
Where Vertices is a Vector3f[].
Core-Dump said:
you can't use the default constructor without further initializing the object.
try:
new com.jme.scene.Line("grid", vertices, null,
null, null) {
Where Vertices is a Vector3f[].
Great! :D
It's working now!
Thank you very much, Core-Dump!