No, it doesn’t sound like your fault at all, there’s something else going on which I’m not sure of yet.
Cas
No, it doesn’t sound like your fault at all, there’s something else going on which I’m not sure of yet.
Cas
Using the zip posted, none of the jar files contain org.lwjgl.Display so of course it doesn’t work by itself. Trying to compile the lwjgl package from CVS is a little hard: no build.xml with a working target, no Makefiles, no compilation directions that I could find.
Am I completely missing it? How would I build this without inserting my own build environment or writing a new build.xml?
Thanks.
Er, the class file is there. I was getting the ‘NoClassDefFoundError’ and just wasn’t “seeing it”.
According to zparticle it would work if I had a GeForce4 (I have a GeForce2).
Umm, I would assume it would work with a GF2. Have you downloaded the binaries from SourceForge? My issue was I had the debug versions _d instead of the release versions.
As long as you have the latest stable nVidia drivers I think it should work. I can run LWJGL on my TnT2 Vanta, for example.
Hrm, thanks for the responses. I have:
Copying all of the DLLs, and jar files to c:\temp I tried:
set PATH=%PATH%;C:\TEMP
java -cp c:\temp\lwjgl.jar;c:\temp -jar c:\temp\grass.jar
or
java -cp lwjgl.jar;. -jar grass.jar
Both failed.
Under linux, the jars and dyanmic shared objects were in the posted zip file and the current directory was in my path.
java -cp ./jwjgl.jar -jar grass.jar
failed.
The error is always:
Exception in thread “main” java.lang.NoClassDefFoundError: org/lwjgl/Display
at Grass.(Grass.java:24)
I notice my GeForce2 on my Linux box with the latest drivers I do have vertex support:GL_NV_vertex_program
all boxes are running JDK1.4.1 or JRE1.4.1.
The win2k box is running the latest NVidia drivers as of today (Dec 3, 2002).
I think I found the problem - at least on the Linux box:
I placed everything in one jar, explicitly set LD_LIBRARY_PATH, and explicitly started grass like this:
java -Djava.library.path=/grass
and I saw new error messages:
Exception in thread “main” java.lang.UnsatisfiedLinkError:
grass/liblwjgl.so: /lib/i686/libc.so.6: version `GLIBC_2.3’ not found (required by grass/libopenal.so.0)
I’m guessing the author compiled with RedHat 8 (at the very least, glibc_2.3). I would have to recompile for my glibc so this would work. I tried this but failed as I didn’t have GLU.
Installed Mesa5.x, needed openal.
Installed openal, liblwjgl compiled great (needed a symlink created to link against libGL, but that was minor - I linked libGL.so to libGLwrapper.so.0.1.7) This link isn’t used anyway - an ldd shows the lwjgl.so is linked against NVidia’s /usr/lib/libGL libraries.
Now it almost works:
java -Djava.library.path=. -jar grass.jar
Available display modes:
Failed to create display due to java.lang.NullPointerException
And I’m stuck. Ideas?
Wow, you certainly won’t give up easily, eh?
I don’t know about the windows version, but being the author of the linux version of lwjgl I might be able to help you:
Yes I build the release on a rh 8 box as you guessed, and that makes the build quite incompatible with pretty much all other distributions out there (rh apparently uses a 2.2.96 snapshot version, not a final libc 2.3).
Regarding your general compile problems: Have you tried newer cvs versions? Many bugs have been ironed out and more importantly, an autoconf build system have been added. If you already use a late CVS version, ignore this.
It seems that lwjgl doesn’t detect any display modes. What version of X distribution do you have? Does other GL apps work (like quake3)? It might be because your X don’t have the XVidMode extension available, although this seems highly unlikely with current X versions (>= 4.0).
If you still have problems feel free to drop by IRC - #lwjgl on irc.freenode.net. I’ll be online and hopefully able to help you some more.
[quote]Wow, you certainly won’t give up easily, eh?
[/quote]
I really want to see the shader code working
I need to wipe my system and install rh 8 to get with the times.
I’m using the latest cvs. The autoconf stuff for native is excellent. I’m just not able to find something like ‘ant jar’ to build the java jar file.
XFree86-4.2.0-patch level 13mdk. NVidia drivers:1.0-3123.
ut2003 and ut work perfectly. java3d works perfectly with hardware accel.
I do not seem to have the XVidMode extension!!!
number of extensions: 14
DOUBLE-BUFFER
GLX
LBX
MIT-SHM
NV-CONTROL
NV-GLX
NVIDIA-GLX
RENDER
SECURITY
XC-APPGROUP
XFree86-Bigfont
XInputExtension
XKEYBOARD
XTEST
What shall poor people like me do without XVidMode?
Thanks! I will try to enable XVidMode (Load “extmod” ?), if I can’t get it working I’m probably sol:-(
OK, I enabled XVidMode. It was easy - I just had to add the Load “extmod” line in XF86Config-4. I had been using X for years without this Now I have 28 extensions! Using Xine should work much better now when I scale to 1600x1200, heh…
Unfortunately all of my modes through the XVidMode extension are 0Hz:
[mswanson@lin grass]$ java -Djava.library.path=. -jar grass.jar
Available display modes:
1600 x 1200 x 16 @0Hz
1280 x 1024 x 16 @0Hz
1024 x 768 x 16 @0Hz
800 x 600 x 16 @0Hz
640 x 480 x 16 @0Hz
Failed to create display due to java.lang.Exception: Failed to set display mode to 800 x 600 x 16 @60Hz
Nothing in life is easy…
The Hz are no problem - currently, the linux version will always return 0Hz. The problem lies in bug in the context creation under 16 bpp displays like the one you’re running. The code tries to create a context with 16 bit color but 24 bit depth buffer, which fails. So either do a cvs update where I fixed this bug and recompile, or switch to 24 bit colors on your X display.
Note, don’t be disappointed by the demo when you finally get it to run, gf2 runs vertex programs in software, hence the demo runs very slowly on your card
WOHOO!!! IT WORKS!!! GREAT JOB!!!
It doesn’t matter that I don’t have a vertex shader (and therefore it’s slow) - it works! I’m really impressed. This is potentially a really great building block that will let Java applications render with the same pixel shader code used by c++ applications.
I know diddly about pixel/vertex shaders or Java3D, so …
Does the lwjgl deprecate the other existing OpenGL for Java projects?
Are there any gotchas to using cg this way? It looks like all you have to do is call: gl.loadProgramNV(). Really?
jwjgl is great (wrt OpenGL), but some people would likely miss the scene graph (and other) capabilities of Java3D. Would anyone be able to comment about how Sun would offer this functionality through Java3D and when they would do this?
Are there any scene-graph libraries for Java that could easily be ported to use jwjgl/OpenGL1.4?
Thanks.
- Does the lwjgl deprecate the other existing OpenGL for Java projects?
Now it would be a bit presumptuous of us to go deprecating everyone else’s APIs eh ? The other main contender for OpenGL, GL4Java, is more full-featured and integrates with AWT properly. LWJGL is just for doing games/demos in a fullscreen window.
- Are there any gotchas to using cg this way? It looks like all you have to do is call: gl.loadProgramNV(). Really?
Yes.
- jwjgl is great (wrt OpenGL), but some people would likely miss the scene graph (and other) capabilities of Java3D. Would anyone be able to comment about how Sun would offer this functionality through Java3D and when they would do this?
Don’t hold your breath.
- Are there any scene-graph libraries for Java that could easily be ported to use jwjgl/OpenGL1.4?
Probably. Or try writing your own?
Cas
Thanks for reminding me why I gave up trying to use Linux
Seriously though… Shouldn’t this stuff “just work”… your average gamer (apart from not going near Linux) is never going to try anything past a double-click to get a game to work. Will the configuration nightmare on Linux ever end? Part of the reason for coding in Java is to run on multiple platforms… but that only works if you can launch the program
That’s why I try to keep my Java programs pure. So far my code has done pretty good on Mac and Linux just launching with web start. (I develop on Windows.) As long as you can get Java installed you are usually home free.
So from a standard extension (Java 3D) point of view, has anyone heard what is planned for taking advantage of ‘advanced’ graphics techniques like this. I expect Java to lag behind the native world. But they can’t fall too far behind without being dismissed entirely.
[quote] Seriously though… Shouldn’t this stuff “just work”… your average gamer (apart from not going near Linux) is never going to try anything past a double-click to get a game to work.
[/quote]
And they wont have to! - please bear in mind that LWJGL is still at alpha stage - there is a lot of working going on right now. Next version should see more features, better support and dynamic loading of dll’s!
at least… thats the plan ;D
[quote] So from a standard extension (Java 3D) point of view, has anyone heard what is planned for taking advantage of ‘advanced’ graphics techniques like this. I expect Java to lag behind the native world. But they can’t fall too far behind without being dismissed entirely.
[/quote]
If we believe the timeline that is there, in 8 months java3d will be very enthusiastic.
http://web1.jcp.org/en/jsr/detail?id=189
I was bored earlier today, so I thought i’d try and get LWJGL working on my other pc, but,
i’m getting the exact same error as I do on this computer (‘Failed to register window class’ if you’d forgotten )
my other machine is a K6 3-450 with voodoo banshee.
the only 2 similarities between the machines, are…
They’ve both got win98 release1 installed,
and they’re both being used by me ;D
now, I was tempted to install win2k on this machine, just to eliminate 1 of the possible (probable) causes - but… well its just so much hassle.
so, will it aid in you tracking down this problem?
(and allow me to start playing with LWJGL ;D )
I keep getting an exception:
“The procedure entry point alcGetEnumValue could not be located in the dynamic link library OpenAL32.dll”
I assumed this to be an older version of OpenAL32.dll, but this is the version that came in the download from the site.
I’m trying to write some documentation while I wait for Apple to finish up JDK1.4.1_01 (which is coming along but still to buggy to know which errors are mine and theirs), so any help would be appreciated.
Edit: I found out that some game or other application that used OpenAL had the .dll installed in the Windows/system32 directory - this will likely cause other people problems in the future I’m sure so I’ll add it to my notes.
Nevermind, got past that - but for the life of me cannot figure out why my GeForce4 Ti4200 is saying that vertex programs aren’t supported. I even tried lowering the resolution just in case it was memory related. One interesting thing is that the application isn’t going fullscreen on my machine but instead running in a frameless window.
Abuse: I added extra output when the RegisterClass function fails. The new dll is here:
http://odense.kollegienet.dk/~naur/lwjgl.dll
The error should be prepended with “System Error:”, see if you get something new out of it…
groovy!
ok, the error was this :-
why do I get the feeling this problem is my own doing somehow :