tutorial on LWJGL, where???

hi there all…

i’m new in this forum, well at first i didn’t expect that there would be a LWJGL forum here. But now since i know this forum exists i would like to ask a question to you guys.

i haven’t use LWJGL because i don’t know where to start, i haven’t found any good tutorial to start with. Do you guys know where to find a good tutorial using LWJGL???

i have try using tutorial on NeHe but it was in C++ and JOGL, so i have still got a problem using the example code. Ii don’t know if there’s a port for LWJGL though, but i’ll check it again.

TiA

You could try the basic rendering tutorial from:
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/index

There are LWJGL ports of nehe too - at the nehe site.

I’m actually looking for tuts myself. I went on nehe.gamedev.net a few days back and grabbed some tuts that were converted to LWJGL, but I had problems getting them to run and compile. If you check out CaptainJester’s profile on here, he has a link to a zip with all the “latest” nehe tutorials on them that he converted.

I tried out lesson 22, which is bump mapping, but I was getting errors with devil. The readme
says it is compatible with LWJGL 0.9x, but I tried 0.98-0.93 and couldn’t get it to to work right.

I got it to run by commenting out some lines of code that were giving me errors, but it doesn’t look like then the bump mapping wast working correctly-I guess i’m just not good enough of a programmer to make it work. :stuck_out_tongue:

Anyways GL with the tutorials and I hope you have better luck with them than me.

Ack! Don’t use the bump mapping from Lesson 22 - That’s Emboss bump mapping, which is awkward to use and not as realistic. Or at least, don’t use it for anything serious :slight_smile:

I don’t know about you, but I always have problems in running NeHe LWJGL tutorials, because of line: IL.ilGenImages(1, image); in method where it loads a texture into memory:

private int loadTexture(String path) {
IntBuffer image = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
IL.ilGenImages(1, image);
IL.ilBindImage(image.get(0));


SOLUTION: just put IL.ilGenImages( image) instead of IL.ilGenImages(1, image) :wink:

That’s because they changed the API after the tutorial was written. The tutorial was written for 0.94alpha of LWJGL.

And if you have a Mac (or Linux?) you need to download the DevIL library manually. Do a search in the LWJGL section for it and you should find some links.

I can’t find that CaptainJester’s link anywhere. Please send it to me betvixt@hotmail.com. Oh and how is it possible to use LWJGL with Gel?

just type in the google nehe game dev, and on the bottom of each lesson is source code for all the different versions of that particular lesson in regards of Programing language. Open a lesson, ctrl+F and type lwjgl. Much luck! If you have any questions let me know i just got done with the LWJGL initiation (2-3 months of coding) :smiley:

If you understand french, you can go on JIGames Community : http://www.jigames.info/ .

There are tutorials on LWJGL, JOGL and Java gaming.

if you know the german language, or trust in translaters, try this one:
http://home.pages.at/evil-devil/evil-devil.com/index.php?menu=tutorials&cat=java&content=java_lwjgl

Someday I will translate it…

i used altavista babblefish to translate to english which makes it a lot easier

http://coding.shakebox.org/Tutorials/

Chman has two very nice tutorials. There are some very minor errors in the pdf, but the provided sources are fine.

one litle noob question.

i have a jared lwgl aplication which i try to run with the usual classpath and library path

flx@kadath:/mnt/win_d/workspace/LWGL_textures$ java -cp ../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_util.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_devil.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_test.jar":textureManager.jar -Djava.library.path="../lwgl/lwjgl-linux-0.99/native/" -jar textureManager.jar

it seems to fail to load the clases on the classpath, since i get the known

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
        at com.proyectoanonimo.flx.lwgl.utils.TextureManager$4.run(TextureManager.java:298)
        at java.lang.Thread.run(Thread.java:595)

however, if i run the same app accessing directly the main class inside the jar, including the jar in the classpath:

flx@kadath:/mnt/win_d/workspace/LWGL_textures$ java -cp ../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_util.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_devil.jar":../lwgl/"lwjgl-linux-0.99"/jar/"lwjgl_test.jar":textureManager.jar -Djava.library.path="../lwgl/lwjgl-linux-0.99/native/" com.proyectoanonimo.flx.lwgl.utils.TextureManager

it runs fine.

how should i specify the classpath to run my aplication with java -jar ?