LWJGL
May 25, 2013, 00:49:52 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Linux framebuffer implementation  (Read 1182 times)
princec
Nerdus Imperius
*****
Posts: 1870



WWW
« on: June 20, 2012, 14:11:20 »

So... I'm a bit behind the times with exactly how the Linux version of LWJGL implements the Display. Does it have any dependencies on AWT? If not, how does it all work and hang together?
And what about the OpenGL-ES part?

Cas Smiley
Logged

kappa
Administrator
Nerdus Imperius
*****
Posts: 1112



« Reply #1 on: June 20, 2012, 15:26:52 »

The Display on Linux is implemented almost entirely using Xlib. There is only a very tiny amount of AWT namely for the Display.setParent() (not used for standalone Display) and a few calls to JAWT's lock/unlock methods.

Not entirely sure why we even need all the lock/unlock calls (and thus dependence on JAWT) for LWJGL's Display to function. There is a note in LWJGL code stating the following:

Quote
/* Since Xlib is not guaranteed to be thread safe, we need a way to synchronize LWJGL
    * Xlib calls with AWT Xlib calls. Fortunately, JAWT implements Lock()/Unlock() to
    * do just that.
    */

Could be that these calls are left over from a time when there was more AWT code in the Linux Display (which has since been replaced by Xlib?) but not really sure.

As far as OpenGL-ES part is concerned it seems to work fine (but needs to be self compiled as pre-compiled binaries aren't provided). Some people have shown examples of getting LWJGL-ES working on various embedded devices using OpenJDK.
Logged
princec
Nerdus Imperius
*****
Posts: 1870



WWW
« Reply #2 on: June 20, 2012, 15:39:53 »

I ask because I'm having a pop at coding on my Raspberry Pi Smiley If at all possible I want to completely avoid X but it looks like LWJGL is at least dependent on X to function. There might be some merit in an SDL implementation - apparently SDL can go direct to the framebuffer and has no need of X to function. Though I wonder how keyboard and mouse input would then work.

Cas Smiley
Logged

kappa
Administrator
Nerdus Imperius
*****
Posts: 1112



« Reply #3 on: June 20, 2012, 15:42:35 »

ah ok, if you do eventually decided to use X, Java and LWJGL then you could try the instructions and binaries found here might help.
Logged
princec
Nerdus Imperius
*****
Posts: 1870



WWW
« Reply #4 on: June 21, 2012, 00:31:46 »

I'm angling to avoid X because I think I want to try to use Oracle's headless JRE for performance reasons. Not least because X wastes a ton of memory which on the RPi you really do need. Using the headless JRE and SDL I reckon I'll have 128mb for the game and 30mb for textures - should be enough Smiley

Cas Smiley
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!