Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Testers needed for jPCT->LWJGL  (Read 12339 times)
0 Members and 1 Guest are viewing this topic.
Offline EgonOlsen
« Posted 2003-01-15 11:06:26 »

Hi,

i'm adding support for OpenGL via LWJGL to http://www.jpct.net right now. If you have LWJGL 0.4 installed, i would be very happy if you would download http://www.jpct.net/download/opengltest.zip and tell me if it runs at all and if it looks somehow like http://www.jpct.net/pics/opengltest.jpg.
My problem is, that i do own three machines but all of them have Geforce cards in them...so i'm not sure if it runs on other hardware.
BTW: the test application opens a 640*480*32 window on the desktop to do the rendering. So your desktop has to be set to 32bit for it to work.

Edit: I does require a card that supports 32bit textures...at least i think it does...i can't test it....

Edit 2: I've uploaded a new version that can be run in software mode too (for comparision or just for fun). Use the batchfile "*_software.bat" for windows or add the parameter "software" to your call to start in software mode.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2003-01-15 13:39:38 »

hmm - having all sorts of problems running it - how do you load lwjgl classes and dll?

standing in a directory, I can do:
1  
java -cp .;lwjgl.jar; Nehe23

to run Nehe demo 23 - works like a charm
doing the same, but:
1  
2  
3  
java -jar terraingl.jar
or
java -cp .;lwjgl.jar; -jar terraingl.jar

gives me a:
1  
2  
3  
4  
5  
6  
7  
8  
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/opengl/Core
GL
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at com.threed.jpct.FrameBuffer.enableRenderer(FrameBuffer.java:377)
        at TerrainGL.Main(TerrainGL.java:246)
        at TerrainGL.<init>(TerrainGL.java:66)
        at TerrainGL.main(TerrainGL.java:70)


adding lwjgl to boot path solves this, however then it can't find the dll:
1  
java -Xbootclasspath/a:lwjgl.jar;lwjgl.dll  -Djava.library.path=.\ -cp .; -jar terraingl.jar


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.libr
ary.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
        at java.lang.Runtime.loadLibrary0(Runtime.java:788)
        at java.lang.System.loadLibrary(System.java:832)
        at org.lwjgl.Sys.initialize(Unknown Source)
        at org.lwjgl.Sys.<clinit>(Unknown Source)
        at org.lwjgl.opengl.BaseGL.<clinit>(Unknown Source)
        at com.threed.jpct.GLRenderer.init(GLRenderer.java:50)
        at com.threed.jpct.FrameBuffer.enableRenderer(FrameBuffer.java:379)
        at TerrainGL.Main(TerrainGL.java:246)
        at TerrainGL.<init>(TerrainGL.java:66)
        at TerrainGL.main(TerrainGL.java:70)

Offline EgonOlsen
« Reply #2 - Posted 2003-01-15 13:44:44 »

Hmmm...i just copied all lwjgl-stuff into the lib/ext directory in my Java-dir and it works this way on every system i tried.
Try to "unjar" terraingl.jar and start TerrainGL.class directly. Maybe that helps.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #3 - Posted 2003-01-15 13:49:09 »

yeah - that worked, though I needed to use the jre java executable...

running fine, a bit dark though - getting ~ 43 fps on my cel 366@550 + GeForce 2 mx

Offline leknor

Junior Duke




ROCK!!!


« Reply #4 - Posted 2003-01-15 15:52:49 »

I read that using the -jar switch make java ignore the CLASSPATH env and -cp/-classpath switches. I think you need to add Class-Path attribute to the jar's MANEFST file for the jar to pick up other jars in the same directory.
Offline elias

Senior Duke





« Reply #5 - Posted 2003-01-15 17:01:59 »

I always run my lwjgl project with:

java -cp lwjgl.jar:project.jar org.blargh.ProjectMain

that way, the "main" jar is just part of the classpath and the ordinary classpath still works.

- elias

Offline EgonOlsen
« Reply #6 - Posted 2003-01-15 17:09:14 »

Quote

java -cp lwjgl.jar:project.jar org.blargh.ProjectMain
So in this case (and for Windows...";" instead of ":") that would be

java -cp lwjgl.jar;terraingl.jar TerrainGL

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2003-01-15 17:56:00 »

Works great for me here, well done! Shame I haven't got anything more exotic to test it on.
Hardware version uses 60% CPU and gets 60fps framerate; software manages about 15fps @ 100% CPU, which makes your software renderer only 1/7th the speed of the hardware renderer - pretty damned impressive really.

WinXP Pro, Geforce 2Go, 1.2GHz PIII-M, 512MB RAM, server VM 1.4.1_01

Cas Smiley

Offline elias

Senior Duke





« Reply #8 - Posted 2003-01-16 05:08:12 »

Runs 100 fps in opengl mode and works fine. Software mode only runs 10 fps.

Redhat 8.0, athlon 700, 512 mb ram, geforce 2 mx, nvidia drivers version 4191.

The fps counter in software mode flickers alot - is that intentional?

- elias


Offline EgonOlsen
« Reply #9 - Posted 2003-01-16 09:45:13 »

Quote
The fps counter in software mode flickers alot - is that intentional?
YEs, it flickers...but it's just a test, so i don't care about it. Anybody with non-NVidia hardware out there?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pepe

Junior Duke




Nothing unreal exists


« Reply #10 - Posted 2003-01-16 11:46:14 »

made the test on a radeon 9000/ PIV 2.2ghz, java 1.4.1_01 from sun, win xp, 512MB ram.
184 to 196 FPS on hardware
16 to 26 FPS on software.
Works very well, no errors, no rendering problems.

Oh, and i can make the test on a radeon 7500 if you like, but i don't think it will be useful.

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline EgonOlsen
« Reply #11 - Posted 2003-01-16 12:29:02 »

Quote
Oh, and i can make the test on a radeon 7500 if you like, but i don't think it will be useful.
If that's possible without too much effort, i would really appreciate it. The more the better  Grin

Offline Grom

Junior Duke




Rats...


« Reply #12 - Posted 2003-01-17 11:41:30 »

Linux 1.3GHz Athlon, GeForce2, 177-188fps.
Great job! jPCT was the best software only 3D API I could find for Java. I like the fact that it comes with MD2 and 3DS model loaders. Now with hardware accel I think it's the easiest way for someone to make a fast 3D game.

Offline whome

Junior Duke




Carte Noir Java


« Reply #13 - Posted 2003-01-17 18:51:16 »

My environment and framerates here:
Current mode:640 x 480 x 24 @60Hz 0bit alpha, 24bit depth, 0bit stencil
FPS: 4 frames
Celeron 500/256MB, Matrox Millennium G400

Probably I cannot find a decent Java-based graphics engine, that could be run smoonthly on my Cel500Mhz :-(

[RunDemo.bat]
set cp=terraingl.jar
set lwjgl=..\lwjgl-0.4\lwjgl.jar
set lwjgl_dll=..\lwjgl-0.4
c:\j2sdk1.4.1_01\bin\java -Djava.library.path=%lwjgl_dll% -cp %cp%;%lwjgl% TerrainGL
Offline EgonOlsen
« Reply #14 - Posted 2003-01-17 19:21:15 »

I doubt that your Cel. ist the problem. The problem is most likely your G400. Try something different or at least to update the drivers for it. A Cel. 500 has to be much faster than that. Look at the post above where Matzon got 43fps on a Cel. 550 with GF2MX.

Edit: is the colordepth of your desktop 24bit?

Offline adamp

Senior Newbie




-x-x-x-


« Reply #15 - Posted 2003-01-17 21:47:50 »

I also had problems getting it started, but "java -cp lwjgl.jar;terraingl.jar TerrainGL" worked :-)
The program runs at 7 fps on my laptop:

1GHz PIII, 240MB RAM, 16MB shared memory video, not accel.

It looks great and I think I'm going to check JWJGL the next days...
Going to run your program on my other system later, too.

Greetings, Adam.
Offline pepe

Junior Duke




Nothing unreal exists


« Reply #16 - Posted 2003-01-18 07:33:27 »

Quote

If that's possible without too much effort, i would really appreciate it. The more the better  Grin

Passed. Smiley
hardware: 110-119 FPS
software: 13-17 FPS
That was on a PIII 1.1GHZ, with a radeon 7500 (mobility M6) on a compaq presario 2700.

Two things to say:
- Nice results for the hardware modes..
- PIV sucks. My other laptop has twice (!!!) the frequency, next (de)generation processor, faster memory, better graphic board, better chipset, and it is not able to at least make 100% better than PIII. lame. Moreover it heats like an oven. i hate my PIV..

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline adamp

Senior Newbie




-x-x-x-


« Reply #17 - Posted 2003-01-18 11:28:29 »

I also tested it on my second machine now... so here are my results:

Laptop: PIII 1000, 240MB, 16MB shared memory (SIS 630s).
It runs 7fps in OpenGL mode and 12fps ins software mode.

Workstation: AMD Athlon 1.4GHz, 256MB, 64MB GeForce 2 GTS.
75fps in OpenGL and ~20fps in software mode.

Ciao, Adam.
Offline whome

Junior Duke




Carte Noir Java


« Reply #18 - Posted 2003-01-18 19:01:10 »

Quote
Edit: is the colordepth of your desktop 24bit?


Yes, I use 24bit colors. I tried 16bit mode, but gave me "This application requires a greater colour depth." error message.

32bit mode gives "This application requires a greater depth buffer depth." error.

I have 1024x screen resolution.

Then I added software parameter and game me 6-7 fps (displayed at the top-left corner now, not in an another floating window).
Offline EgonOlsen
« Reply #19 - Posted 2003-01-18 21:05:28 »

Quote
Yes, I use 24bit colors. I tried 16bit mode, but gave me "This application requires a greater colour depth." error message.
Then i suggest to try another OpenGL application that runs in a window and see how it runs. Either your graphics card/driver has a problem with doing OpenGL in a window (or doing OpenGL at all) or something with your setup is wrong. Your performance in OpenGL mode is much too low. The 6-7 fps in software mode sound realistic though.

Offline elias

Senior Duke





« Reply #20 - Posted 2003-01-19 06:57:51 »

Or it might be a problem with lwjgl - on windows, lwjgl apps should be able to swiych color depths on the fly, afaik. So why does it matter that the desktop is in 16 bit mode? And what is the difference between 24 and 32 bit desktop depth?

EDIT: I have seen that selecting a weird mode drops the app back to standard software opengl. We really should implement real queries of available pixel formats. Like on linux Cheesy. Cas is on it, but I think he is way too busy atm.

- elias

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #21 - Posted 2003-01-19 08:59:20 »

It's a "feature" not a "bug"... under Windows you can do OpenGL in nearly any mode because it gives you a software driver if you ask for something the hardware doesn't understand - which is perfectly legal - but feckin useless because their driver is so awfully slow. (How fast is Mesa5.0? Anyone tried it?)

There is an obscure ARB extension for getting available hardware pixel formats but it's not widely supported.

The only thing you can do is check for the telltale Windows software driver name with glGetString(GL_VENDOR) (I think) and exit if you get Micro$oft in there somewhere.

It shows you just how slow M$'s default OpenGL implementation is as well doesn't it?

BTW, it's usually best to ask for 16-bit colour to ensure the app runs on a wider variety of hardware.

Cas Smiley

Offline elias

Senior Duke





« Reply #22 - Posted 2003-01-19 09:31:47 »

All this trouble getting a valid mode makes me think lwjgl should include a more robust way of selecting a display mode. If we can't always be sure of the available modes, why not do like spgl does per default? That is, instead of querying modes with Display.getAvailableModes(), use a Display.switchToBestMode(...), that select the best matching mode from the application specified min/max limits on depths, window size etc.?

That way, lwjgl more closely matches the behaviour of ChoosePixelFormat/glXChoosePixelFormat (and probably also that of the mac equivalent).

EDIT: ... and I don't think game developers are overly concerned about the _exact_ properties of the mode they get, as long as it meets certain requirements. Or more specificly, the exact pixelformat might not matter - window sizes should match the required size, IMHO.

- elias

Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #23 - Posted 2003-01-19 10:09:43 »

all I get is a tiddy little window  Huh

http://www.pkl.net/~rsc/downloads/tiddybox.png

software works fine though - 19-20fps ish

athlon1.33 256mb ddr, gf2gts 32mb

strange - cos other LWJGL stuff works just fine.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #24 - Posted 2003-01-19 10:16:20 »

Quote


- PIV sucks. My other laptop has twice (!!!) the frequency, next (de)generation processor, faster memory, better graphic board, better chipset, and it is not able to at least make 100% better than PIII. lame. Moreover it heats like an oven. i hate my PIV..


silly question, but...
Was the p4 was connected to the mains when you tested it? (cos they clockdown to conserve battery)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline EgonOlsen
« Reply #25 - Posted 2003-01-19 11:02:21 »

Quote
all I get is a tiddy little window  Huh
That's the fps-display-window. The LWJGL windows is shown in your taskbar but obviously not visible. I have this problem on one of my machines too, if i focus anything before the LWJGL windows comes up...it's there in the taskbar and the application seems to run, but nothing is visible...don't knwo how to get rid of this but to use fullscreen instead (my test application won't let you do so though).

Offline pepe

Junior Duke




Nothing unreal exists


« Reply #26 - Posted 2003-01-20 02:39:47 »

Quote


silly question, but...
Was the p4 was connected to the mains when you tested it? (cos they clockdown to conserve battery)


Yes, certainly. Both laptops were running at full frequency.
Nevertheless, while the difference in frequency and new stuff did not change speed as expected, some of my tests (including inlining) showed that things changed for bandwidth and that some optimisations on my side for reducing its use were not useful anymore. Good point there.

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline elias

Senior Duke





« Reply #27 - Posted 2003-01-20 07:11:09 »

Yep, win32 lwjgl windows are not state-of-the-art yet, unfortunately. One of the reasons is that not all of us wants windowed mode to be implemented as anything else than debug windows. I hope we can iron out the remaining bugs in the boring stuff like focus, alt+tab'ing etc in time for 1.0.

- elias

Offline whome

Junior Duke




Carte Noir Java


« Reply #28 - Posted 2003-01-21 18:03:09 »

Quote
Then i suggest to try another OpenGL application that runs in a window and see how it runs. Either your graphics card/driver has a problem with doing OpenGL in a window (or doing OpenGL at all) or something with your setup is wrong. Your performance in OpenGL mode is much too low. The 6-7 fps in software mode sound realistic though.


Ok, I will do this test only if I had a such OpenGLled test program. I don't have any games in this machine and does not know any freely avail games with OpenGL support.  If any1 could link here a native OpenGL test program, I could benchmark fps.
Offline elias

Senior Duke





« Reply #29 - Posted 2003-01-21 18:41:49 »

http://www.tuxracer.com/ has a free demo for win32 too and runs opengl. I don't know if it can run in a window though.

- elias

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (53 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (43 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!