Trying to create a heightmap game

I get some strange "NoSuchMethodError" when I try to…


   protected void initGame() {
      scene = new Node("Scene graph node");

      FaultFractalHeightMap map = new FaultFractalHeightMap(129, 5, -10, 10, 0.3f);
      TerrainPage terrain = new TerrainPage("Terrain", 10, map.getSize(), new Vector3f(1,2,1), map.getHeightMap(), true);
      
      scene.attachChild(terrain);
   }

   protected void render(float percentWithinTick) {
      display.getRenderer().clearBuffers();
      display.getRenderer().draw(scene);
   }



I get this error:

java.lang.NoSuchMethodError: org.lwjgl.opengl.GL11.glVertexPointer(IIII)V
   at com.jme.renderer.lwjgl.LWJGLRenderer.predrawGeometry(Unknown Source)
   at com.jme.renderer.lwjgl.LWJGLRenderer.draw(Unknown Source)
   at com.jme.scene.TriMesh.draw(Unknown Source)
   at com.jme.scene.lod.ClodMesh.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.scene.Node.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.scene.Node.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.scene.Node.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.scene.Node.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.scene.Node.draw(Unknown Source)
   at com.jme.scene.Spatial.onDraw(Unknown Source)
   at com.jme.renderer.lwjgl.LWJGLRenderer.draw(Unknown Source)
   at szf.game.SZFighter.render(SZFighter.java:40)
   at com.jme.app.FixedLogicrateGame.start(Unknown Source)
   at szf.game.SZFighter.main(SZFighter.java:106)



Any ideas?

Doesn't seem to be a version mismatch. (I'm using jme 0.10)
I've tried:
- lwjgl 1.0 b4
- lwjgl 1.0 b2
- lwjgl 1.0 b2 (and the lwjgl.jar and lwjgl.dll from the jme cvs)

jme 0.10 isn't compatible with lwjgl 1.0beta… you'll have to use lwjgl 0.99 with jme 0.10



Check out http://www.jmonkeyengine.com/wiki/doku.php?id=lwjgl_version_to_be_used_with_different_jme_releases for guidelines.



NoSuchMethodError's happen when you change to a different library (jar), try to run a program with it, and the underlying library changed.



You'll have to start using the nightly cvs if you want to use lwjgl 1.0b, but it's of course less stable than the official release.

Ok, thank you for your prompt reply. I got it to work :slight_smile: