Compiler Error

I test the code from TestFluidSimHeightmap from jmetest.terrain in my own project (the same happend with the other files from terrain test) but the code works in the cvs jme project?!

and the compiler complains:





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.renderer.lwjgl.LWJGLRenderer.draw(Unknown Source)

at com.jme.app.SimpleGame.render(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at util.tester.TestFluidSimHeightmap.main(TestFluidSimHeightmap.java:70)



Code:



package util.tester;



import javax.swing.ImageIcon;



import com.jme.app.SimpleGame;

import com.jme.image.Texture;

import com.jme.input.NodeHandler;

import com.jme.light.DirectionalLight;

import com.jme.math.Vector3f;

import com.jme.renderer.ColorRGBA;

import com.jme.scene.CameraNode;

import com.jme.scene.state.CullState;

import com.jme.scene.state.TextureState;

import com.jme.util.TextureManager;

import com.jmex.terrain.TerrainPage;

import com.jmex.terrain.util.FluidSimHeightMap;

import com.jmex.terrain.util.ProceduralTextureGenerator;



/**

  • <code>TestFluidSimHeightmap</code> demonstrates the usage of
  • <code>FluidSimHeightMap</code>.

    *
  • @author Frederik B

You're using an old version of LWJGL or of jME, somehow.

i think so,  stands the glVertexPointer(IIII) for a function with 4 integer parameters,

those one don

Since it works in the jME project, somehow your other project is using the wrong version of jME, or it's using the wrong version of LWJGL.



I think it's the last one… current LWJGL has method glVertexPointer(IIIL) which should work for glVertexPointer(IIII). Check your default classpath, maybe there's an old version of LWJGL on it or something. You can also try explicitly putting the LWJGL lib on the buildpath/classpath of your own project. If you use Eclipse, that, in combination with putting the jME project on the buildpath (no need to make or add any jars) should normally ensure everything is the same as the jME project itself.


ok, i put the jme 0.10 jars in the lib directory and the lwjgl beta 0.3 in the same and the native dll lwjgl data

but same error

.10 is for lwjgl .99. .10 was released Friday, April 28, 2006 , LWJGL LWJGL 1.0 Friday, June 2nd, 2006. The jme project, as you mention uses CVS. So no suprise there…



Just put the jME CVS project on the build path of your project and the LWJGL libraries. There's an entire tab for that in Eclipse called "Projects". Or use the Ant script to generate up to date jME jars.

ok I read the getting started documentation:

JME Getting Started:

Note: Getting and compiling the source code for jME is what this guide is all about. If you just want the pre-compiled jar files of the latest release, you can simply download them from the website. Note that you will also need to download and install LWJGL manually!



Is this obsolete now?

So I must build Jar Files from the source-code?

No, you can download .10 jars and LWJGL .99 just fine… what you can't expect is .10 to magically work with the latest LWJGL version.



That getting started guide you quote is about using the most recent source … the part you highlight explains what you can do if you do not want to do that. (That seems pretty obvious).



You can't use the latest source and at the same time use pre compiled jars of a release version… you can use the latest sources to make up to date jme jars, but as I explained, if you just want to develop in Eclipse you don't have to do that either! You can just use the source, and put the project containing the source on the build path of your other projects.

ok i