Changing rendering to OpenGL causes crash

Started by Leshiy, February 05, 2008, 05:57:11 PM

Previous topic - Next topic

Leshiy

Hi there, I have strated to mess about with the examples given in the package and found a curious problem. First I couldn't set up lwjgl to work, then i got that working with new 1.1.4 version and so files.

Now when I change rendering from SW to OpenGL I get this error in eclipse

Quote
Can't find desired videomode (640 x 480 x 32) - searching for alternatives
[ Tue Feb 05 16:48:16 GMT 2008 ] - ERROR: Can't find any suitable videomode!
[ Tue Feb 05 16:48:16 GMT 2008 ] - ERROR: Can't set videomode - try different settings!
Software renderer disposed

I am using car demo from example and switching with simple  "X" in game.

Any suggestions why it is doing that, or how to correct it?

Another thing is on my linux box when the window is first opened I get an error from X server (I presume) something about libxcb. more details to follow ...

EgonOlsen

This is Linux, right? Try to play around with the bpp setting. Linux doesn't like 32bpp and wants 24bpp instead IIRC.

Leshiy

K thanks I messed about with config little bit. I get now to OpenGL mode but I also get this error in console

Quote
Current mode:640 x 480 x 24 @88Hz
Driver is: null/null on NVIDIA Corporation / GeForce 6600/PCI/SSE2
FBO supported and used!
OpenGL renderer initialized (using 4 texture stages)

Is it problem with graphics card driver (hence I need to bug NVidia) or jpct?

EgonOlsen

Looks fine to me. On Linux, some driver information seem to be missing on Linux, hence the null/null. But that's nothing to worry about.

Leshiy

Well I lose all of the listeners, the window freezes, I can't move or even quit properly. My frames per second is about 300-400 which I don't think is right.

So even though it looks like it uses OpenGL I don't think it does.

EgonOlsen

It uses OpenGL judging from the log entry. 300-400 fps may very well be, too. Maybe LWJGL's input handling doesn't work correctly on you Linux version. Which LWJGL-version are you using?

Leshiy

1.1.4 is version that I am using.

I have just been trying it on my home linux and ATI card and although I get same error it actually renderes it and works fine with ~120 fps. I also get another warning

Quote
[ Fri Feb 08 16:34:32 GMT 2008 ] - WARNING: ZBuffer depth of 24 not supported - trying something else now...!
[ Fri Feb 08 16:34:32 GMT 2008 ] - WARNING: ZBuffer depth is now set to 16bpp!
Driver is: null/null on ATI Technologies Inc. / ATI RADEON 9600 Series
FBO supported and used!
OpenGL renderer initialized (using 4 texture stages)
Software renderer disposed
OpenGL renderer disposed

So I guess it is NVidia's fault and ATI handles it better. I also have massively different spec of this linux box.


Also here is warning that I get that I mentioned earlier:

Quote
Loading Texture...textures/other/numbers.jpg
libxcb: WARNING! Program tries to unlock a connection without having acquired
        a lock first, which indicates a programming error.
        There will be no further warnings about this issue.
libxcb: WARNING! Program tries to lock an already locked connection,
        which indicates a programming error.
        There will be no further warnings about this issue.

It does appear twice and not just me pasting it twice. I am running
xorg-x11 7.2-135
xorg-x11-server 7.2-143
xorg-x11-libxcb 7.2-51.2

EgonOlsen

The warnings are intentional and nothing to really worry about. jPCT tries to get a display mode like it is configured in Config. If that fails, it lowers the requirements to find at least some mode in that resolution that works. The null/null really doesn't matter. It's not a problem at all. I can't comment on the warnings....those are triggered by LWJGL or whatever, but not by jPCT.


Leshiy

Just had a look at that problem of OpenGL renderer on NVidia box and it doesn't crash, rather it polls the keyMapper and gets KeyState.NONE every time.

So does that mean it has a problem with polling keys in OpenGL renderer on NVidia card, becasue it works on my ATI card? (java versions and the whole OS are different)

EgonOlsen

No idea. Polling keys is done by LWJGL, not by jPCT. If you don't trust the KeyMapper, try to do the polling on your own by accessing LWJGL directly. It's not that hard at all.