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]
  ignore  |  Print  
  LWJGL for linux (first test)  (Read 4271 times)
0 Members and 1 Guest are viewing this topic.
Offline elias

Senior Duke





« Posted 2002-11-13 10:13:41 »

A finally lost my patience waiting for LWJGL to linux and implemented something that could be the base for such a port.


You can find a tarball at

http://odense.kollegienet.dk/~naur/lwjgl13112002linux.tar.bz2

with a current CVS checkout modded with a linux/ directory under src/native. In that directory you'll find the most basic files to get the test program running (the famous rotating square test ripped from the lwjgl skeleton code on their site with a small glitch fixed). The test program is in the src/java/ dir for your convenience. In the bin directory you will find a precompiled liblwjgl.so if you only want to see lwjgl in action on linux.

On my redhat 8 system cd'ing to the src/native/linux and typing make is enough to compile the library, in which case you only need to copy bin/liblwjgl.so to the java ext dir (i.e. /usr/java/j2sdk1.4.1_01/jre/lib/i386) and compile/run the test program.

Fullscreen mode switching and windowed mode gl works, but everything else doesn't :-) That includes the Sys timer, Math ops, GL extentions and all input. So it definately lacks some work but the basic is there to build upon.

Give it a whirl and tell me what you think.

Offline elias

Senior Duke





« Reply #1 - Posted 2002-11-13 10:18:33 »

And an added note: Currently no input is possible so the lib never gets a chance to clean up and switch the mode back to the original, but once input is in place it should clean up correctly, and you will no longer be able to move the cursor out of the window and thereby panning the display on the virtual desktop.

- elias

Online princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2002-11-13 10:59:24 »

!!!!!
How cool is that?
Do you want me to put you on the sourceforge team Elias? We've been looking for a Linux developer to do the port.

Cas Smiley

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

Senior Duke





« Reply #3 - Posted 2002-11-13 11:06:53 »

Well, yes but currently I can't guarantee neither time nor a completed port (I have never ever touched the inner workings of X and GLX before yesterday and my primary selfish motive for porting is to use it in a project I have that uses GL4Java). But if you do add me I'll see what I can get up and running. We all know that time is important when it comes to java gaming ;-)

Offline elias

Senior Duke





« Reply #4 - Posted 2002-11-13 11:14:28 »

This whole fullscreen thing reminds me of the buildin java 1.4 fullscreen on linux discussion. Now that I have seen what it requires to switch to fullscreen, I'm wondering what stopped the Sun developers? Yes, the XF86VidMode is an extention, but is in any case better to use when available than always just returning false in getFullscreenSupported().

Anyone?

Online princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2002-11-13 12:24:00 »

It's really more to do with retrofitting the rest of the AWT in with the situation as well... for LWJGL we can get away with it because all we want to do is draw GL stuff on a blank screen. Otherwise there's no excuse :p

In any case, I suspect that using SDL to implement nearly all the functionality is what you want to be doing. Shouldn't take long I think.

Have you got a sourceforge userID?

Cas Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #6 - Posted 2002-11-13 12:34:27 »

Shocked
This is just sooo great!

Don't worry about time - we're all somewhat busy and it isn't like we work 10 hours a day on it - just now and then...

pending your username and stuff - welcome aboard Smiley

ohh and one last thing:
Rart at have en dansker mere med i gruppen Wink

Offline elias

Senior Duke





« Reply #7 - Posted 2002-11-13 12:44:24 »

username: elias_naur

Anything else? I have never worked with a sourceforge project before, but I do know some cvs.

SDL? And here I have sweated to make it work with native Xlib coding ... tsk tsk. Well it'll have to stay that way until something really annoying with Xlib shows up. In any case it keeps the dependencies down to a minimum. I'm working on input right now (ever paniced when you manage to grab the keyboard but the window system won't let it go?).

Unless of course someone has a good reason to use SDL instead.

- elias

Online princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2002-11-13 13:39:59 »

The only good reason to use SDL is that they've solved a whole bunch of problems already, for a lot of different platforms. I'd even go so far to say that it might even be a good idea to port the Windows implementation over to use SDL instead of DirectX but there's no urgent need to throw it all away just yet...

I've added you to the project as a developer. Stick your linux code in a /linux directory next to /win32. Any completely cross-platform native code just lives in /common.

Cas Smiley

Offline elias

Senior Duke





« Reply #9 - Posted 2002-11-13 17:19:45 »

hmm, it seems that I don't have cvs add rights on the repository (or else I'm doing something wrong). I could cvs add the linux  dir, but not individual files in it.

Anyway, the tarball at

http://odense.kollegienet.dk/~naur/lwjgl13112002linux.tar.bz2

has been updated, so keyboard and mouse input works like the win32 version. The testprogram Game.java (currently in src/native/linux) can detect mouseclicks and movement and properly quit with esc now. Finallly, you can't leave the window in fullscreen mode anymore.

- elias

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

Junior Duke




Nothing more that... Java games are cool !


« Reply #10 - Posted 2002-11-13 17:29:13 »

Great work !
You're on a good way !  Grin
Offline elias

Senior Duke





« Reply #11 - Posted 2002-11-18 17:37:05 »

Ok an update for those interested:

1. All of OpenGL + extensions should work now (BaseGL, Display, CoreGL, Gl, GLU).
2. Input from Mouse and Keyboard works, including scroll wheel and proper cursor blanking (Mouse, Keyboard). I don't have a joystick or a gamepad so I might need some help with those.
3. The Sys functions are implemented (Sys), including timer and process priority methods.

.. and all this on the current lwjgl CVS for you to enjoy!

- elias

Online princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #12 - Posted 2002-11-18 22:17:00 »

Can you build a release for Linux for us?

Cas Smiley

Pages: [1]
  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 (45 views)
2014-10-17 03:59:02

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

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

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

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

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

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

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

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

BurntPizza (81 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!