jPCT and Webstart

Hi,

i’m just fiddling around with Webstart and i tried to make a little jPCT demo “webstartable”. It should start in a 640*480 window using the software renderer and it should be possible to switch to OpenGL by pressing “x”. OpenGL (via LWJGL) should work on Windows and Linux (no Mac yet, i’m sorry), Software should work everywhere.
ESC exits the demo. Move with the cursor-keys and look up/down with page-up/down. Please let me know if it works (especially in LWJGL-mode).
Here’s the link: www.jpct.net/webstart/demo.php

BTW: The window of the software renderer can be resized, but the LWJGL-mode is fixed at 640*480 for now.

[quote]Hi,

i’m just fiddling around with Webstart and i tried to make a little jPCT demo “webstartable”. It should start in a 640*480 window using the software renderer
[/quote]
Works great so far (linux 1.4.2), and the software renderer looks great too (about 6-12fps judging by eye @ 1ghz).

I see the message about “disposing software renderer” appear in the jws console, then it crashes. The crash is clean (the console vanishes, java unloads - rest of X-Windows is fine) but the app has definitely gone bye-bye :frowning: ). A quick check with PS reveals it’s not in memory any more.

Software renderer does not work on Mac (10.3.2 JRE 1.4.2_03)


Building octree for object229
Octree for object229 constructed with 989 nodes / 795 leafs.
Java version is: 1.4.2_03
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
51-113 -> using splitted buffer access!

then I get the 640x480 window, but it’s empty (aqua L&F striped background). I waited several minutes.

[quote]then I get the 640x480 window, but it’s empty (aqua L&F striped background). I waited several minutes.
[/quote]
That’s strange… ??? …it’s just simple AWT stuff going on there. I updated the demo. Please try again and press ‘2’ after the window appears. The console should now tell you if the app is waiting for a resize or not. That’s the only thing i can think of at the moment that may cause this.

[quote]I see the message about “disposing software renderer” appear in the jws console, then it crashes.
[/quote]
Maybe you can redirect the output of the webstart console to a file and tell me if “disposing software renderer” is really the last entry there is before exiting. In addition i made two more webstarts at http://www.jpct.net/webstart/demo2.php (no trilinear, 16bit zbuffer only) and http://www.jpct.net/webstart/demo3.php (the same as 2 but in 1024*768 ). Maybe you can give them a try!?

Runs perfect, both in software and LWJGL, on winXP with jre1.4.2_03.

New version works now (didn’t need to do anything different - e.g. no pressing ‘2’ or anything).

5-8 fps… (1GHz PPC G4)… not too bad, considering it’s all java.

I tried the second demo and had exactly the same results.

I eventually found the log-to-file :slight_smile: in javaws, and got:


Software renderer disposed
Software renderer (OpenGL mode) initialized
43-49 -> using splitted buffer access!
Java version is: 1.4.2
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Software renderer disposed
Java version is: 1.4.2
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
[ Tue Mar 02 22:13:33 GMT 2004 ] - ERROR: Can't find any suitable videomode!
[ Tue Mar 02 22:13:33 GMT 2004 ] - ERROR: Can't set videomode - try different settings!

The preferred mode for this laptop is 1400x1050 (lcd resolution) but it’s usually happy to change to other modes. For instance, IIRC I had late versions of AF running absolutely fine on it without any tweaking (and I don’t think they use 1400x !??..nb: hard to tell, because the geforce does auto-scaling to LCD resolution with bilinear (or better?) filtering, so sometimes you can detect a slight blur, but that’s the only way of knowing…)

PS: Suggest you change the JNLP file for demos 2 and 3…at the moment they all have the same title, which makes launching from within javaws very confusing! :slight_smile:

[quote]New version works now (didn’t need to do anything different - e.g. no pressing ‘2’ or anything).
5-8 fps… (1GHz PPC G4)… not too bad, considering it’s all java.
[/quote]
Great…but i haven’t changed anything except adding a System.out.println(); when pressing ‘2’ ???
Anyway…does resizing the window works too?

PS I was running AF without JWS, by dropping the lwjgl .so file in appropriate location.

PPS I finally noticed the small FPS counter in top left :slight_smile: my guess was pretty much spot-on (you can tell an old quake-deathmatcher…;)), varies from low of 5 up to 8+ fps if you look at a blank wall.

I changed them to demo2 and -3…thanx for the hint. About the video-mode…AF is putting a lot more work into finding a correct mode than i do ATM. I’m just trying to find a 640480/16bpp mode (windowed, not fullscreen) and i’ll take everything with a higher colordepth too. Requesting 1024768 (via the third link) doesn’t work either?

Runs @ ~24 fps software
300 fps LWJGL

Exactly the same behaviour; only difference is that hte software renderer drops to 3-4 FPS :).

I know I’m using >> 16bpp, but I’m taking a guess you don’t agree with the theory that “24 > 16” ;D. So…

Scanning through the X-windows log, I found:


Markers: (--) probed, (**) from config file, (==) default setting,
...
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32 
(==) NVIDIA(0): RGB weight 888
...
(--) Depth 24 pixmap format is 32 bpp

Which is interesting, because it suggests (but it’s hard to be sure without searching for random linux docs that could be anywhere, really) that the driver would like to run at 32 but I’ve managed to force it to 24. The last message there is particularly linux-ish (def: cryptic, confusing, totally unhelpful :wink: ) .

Anyway, further investigation of X settings turned up one config file (yeah, linux has “chains” of config files overriding each other, all with similar names and no obvious piority :() requesting a default 24 for all screen modes. The only reason I can think of for this is that there’s some reason why 32 doesn’t work with the nVidia drivers. I shall restart and see if I changing that line to 32 makes a difference (or even if I can still run X!).

Repeat after me: “nVidia write **** drivers…”.

Fatal error: NVIDIA: 32bpp not supported

So, there you go :(.

I’ll have a look and see if they have an update, but it looks like 32 bpp just ain’t available in linux on a GF2 on a laptop :frowning:

EDIT: X-Windows “depth 32” does NOT mean that the desktop is running in 32bpp, and in fact is an illegal value for all drivers. Well, that’s obvious, isn’t it? Who would want a 32 bpp desktop…

So, it’s not nVidia’s fault :). For the record, they also have finally improved their linux drivers, and have added a very nifty interactive install (using ANSI menus and everything!) which is much much better than before. Big thumbs up to whoever @ nV has made this change :).

Although smething went slightly wrong and I’m now running at 1280x1024, which means my desktop is kindly being bilinearly filtered for me. It looks rather nice, in a way, easy on the eyes…but I think I prefer the razor-sharpness I’m accustomed to :(.

Odd, Opera doesn’t want to start webstart if I just open the file direct, yet does clearly show the type as being the correct x-java-whatever. Saving and renaming to .jnlp works great. I wonder if the extension is confusing Opera (or I have it set up wrong).

I get ~18fps software and 76 with OpenGL (must be v-synced). Funny I seem to remember the software one running faster when I tried it a while ago.

As an aside, the software rendering is pretty damned fast, has anyone thought about using it in Xith for occulsion queries?

It works for me on a GeForce3 using the latest drivers on a kind of Debian. Anyway, i’ve uploaded another version that can be started here: http://www.jpct.net/webstart/demo4.php. This one won’t work too, but it should at least print out the available videomodes before exiting. Would be interesting to know what your setup actually supports.

Can’t be…it’s even slightly faster in the new version. But my previous demos where 512384, this one is 640480 and maybe you are refering to level with less polygons.

With the latest drivers…(but note: they screwed up the config files, and I haven’t yet found which one(s) they changed so I can fix them, and I’m now running in an unusual screen mode (see previous post))…

It works perfectly :). FPS averages at 66ish with LWJGL, peaks at 112, and a low of about 48.


Software renderer disposed
mode: 640/480/24/0
mode: 1024/768/24/0
mode: 700/525/24/0
mode: 320/240/24/0
mode: 512/384/24/0
mode: 1280/1024/24/0
mode: 400/300/24/0
mode: 640/512/24/0
mode: 800/600/24/0
mode: 1280/960/24/0
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
Current mode:640 x 480 x 24 @0Hz
OpenGL renderer initialized

I’ll try and fix my desktop, and report back once I get into 1400 again. Maybe this is a fixed driver bug…

PS I guess these are LWJGL bugs, but…LWJGL version only:

[] Window cannot be resized
[
] Window cannot be moved (!)
[] Window cannot be closed (! - has a close button, nothing happens when you click it)
[
] When the window has focus, the window manager stops responding (e.g. you can’t click on the “Start” button on taskbar any more)

[quote]and maybe you are refering to level with less polygons.
[/quote]
Thats probably it, last time I tried it it was a different level.

I notice its not open source as such. Is there possibly a simple (flat shaded, no textures etc.) mode that can be used for depth testing?

(back at 1400x1050, and it doesn’t work again). I get this output:


Software renderer disposed
mode: 1400/1050/24/0
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
[ Wed Mar 03 00:20:29 GMT 2004 ] - ERROR: Can't find any suitable videomode!
[ Wed Mar 03 00:20:29 GMT 2004 ] - ERROR: Can't set videomode - try different settings!

Here is what I believe is happening:

[] There is a bug in the EDID communication between NV drivers and the custom Dell LCD’s in the mainstream Inspiron series, whereby the NV card comes to believe that the LCD cannot support the actual resolution it was manufactured for (!)
[
] To get around this, you have to disable all the auto-detect settings in NV’s driver, so that it will let you tell it “yes, actually my monitor does support the one resolution it was built for”
[] The latest drivers have a regression where this disabling doesn’t work (an old driver had the same bug, then they fixed it, now it’s broken again). But…there’s another way of doing it (and because I’ve been trhough this pain before I recall the workaround).
[
] Net result: 1400x1050 is the only availalble mode at the moment, unless I can find a custom mode spec for the LCD for each other mode (don’t you just love linux?). If I allow the NV driver to auto-detect, I can’t use my desktop, but it automatically creates all appropriate modes.

Hence…only 1400x1050 appears in the list reported by LWJGL. But…for windowed mode, you should just accept that anyway! (shouldn’t your code pick: “the smallest resolution that is equal to or greater than the desired window size and bpp” ???)