jPCT 0.92 - small test application

Hi there,

i’m trying to get jPCT 0.92 out of the door within the rest of my holidays (but i don’t think i’ll make it in time… :frowning: ). Anyway, i wrote an application for testing some of the fixes and features i added and i would be very pleased if you can “try this at home” too and tell me:

  • does it run at all
  • does LWJGL-support work (press ‘x’ to toggle software/LWJGL)
  • how is performance in both software/LJWGL mode
  • do the keyboard controls work in LWJGL

There’s a readme.txt in the zip which explains the controls and some other things.

Thanks for your time and sorry for the large download (around 2MB)…the textures, you know…

Anyway, here’s the link:
http://www.jpct.net/download/viewer.zip

It runs fine, both lwjgl & software

I got some exceptions though:

[quote]java.lang.NullPointerException: component argument pData
at sun.awt.windows.Win32BackBufferSurfaceData.initSurface(Native Method)

    at sun.awt.windows.Win32BackBufferSurfaceData.createData(Unknown Source)

    at sun.awt.windows.Win32BackBuffer.createHWData(Unknown Source)
    at sun.awt.windows.WVolatileImage.initAcceleratedBackground(Unknown Sour

ce)
at sun.awt.windows.Win32BackBuffer.displayChanged(Unknown Source)
at sun.awt.SunDisplayChanger.notifyListeners(Unknown Source)
at sun.awt.Win32GraphicsEnvironment.displayChanged(Unknown Source)
at sun.awt.windows.WToolkit$4.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

[/quote]
and a single:

[quote]Unexpected Signal : EXCEPTION_INT_DIVIDE_BY_ZERO (0xc0000094) occurred at PC=0x691B2B3B
Function=[Unknown.]
Library=C:\WINDOWS\system32\atioglxx.dll

Current Java thread:
at org.lwjgl.opengl.CoreGL.clear(Native Method)
at com.threed.jpct.GLRenderer.execute(Unknown Source)
at com.threed.jpct.FrameBuffer.clearHardware(Unknown Source)
at com.threed.jpct.FrameBuffer.clear(Unknown Source)
at com.threed.jpct.FrameBuffer.clear(Unknown Source)
at DefaultViewer.mainLoop(DefaultViewer.java:655)
at DefaultViewer.run(DefaultViewer.java:789)
at java.lang.Thread.run(Unknown Source)
[/quote]
but this seems to be a ATI OGL driver bug

fps sw def settings: ~ 24 fps
fps hw def settings: ~ 105 fps

Keyboard works fine in both modes.

Throw in some weapons, a bot and I’ll be happy :slight_smile:

Have them too…it’s somehow related to switching from Java2d fullscreen to LWJGL fullscreen, but i don’t know what to do to get rid of them. The way it is, is the best i could do…everything else caused the VM to crash somewhere deep in an AWT.disposeBlahBlah-method…

Just tried -server mode.
wow this entirely redefines java being slow!!! Must be some weird bug or something

[quote]Just tried -server mode.
wow this entirely redefines java being slow!!! Must be some weird bug or something
[/quote]
Yes! This is, where it’s wasting all the time:

image=Toolkit.getDefaultToolkit().getImage(filename);

The funny thing is, that it doesn’t always happen. Starting it 10 times may result in 5 slow and 5 fast runs…a really strange behaviour.
(Just talking about texture loading here…the renderer itself has quite a high warmup-time too, but that’s fine because it WILL run fast sooner or later).

Ran just fine for me, looked great too…

software mode: ~15 FPS
LWJGL mode: ~100 FPS

P4 2.5GHz
GeForce3

It ran fine.
I’m at work so I could only try software mode (no fancy 3D card here :))
JView was the fastest (up to 15 fps), followed by Sun 1.4.1 -client (up to 14 fps). The Sun server VM was really SLOW (sometimes 4fps, but generally <1fps)! Not just the image loading (took ages), but everything performed very, very badly on the server VM, also after letting it run for a while. Strange…

I was overall very impressed. Looks great!

Erik

[quote]The Sun server VM was really SLOW (sometimes 4fps, but generally <1fps)! Not just the image loading (took ages), but everything performed very, very badly on the server VM, also after letting it run for a while. Strange…
[/quote]
Well, it should perform better after a while, but 1.4.1 has a much higher warm-up time than 1.4.2’s server-VM and on a single cpu machine, it’s even higher, so it will be indeed very slow for a long time…but unless i get an idea why the image-loading is so bad (it always was using server), the server-vm is not really an option anyway…

I’ve updated the test to include some animation and an improved occlusion culling for the software renderer. Won’t be very noticable though… :slight_smile: