Jump to content
  • entries
    945
  • comments
    5,899
  • views
    930,188

Leadwerks GUI for Linux


Josh

3,238 views

 Share

It took most of the weekend, but I've got Leadwerks GUI running on Linux, rendering directly to an X11 window. This is the fastest possible rendering method on Linux, and I think you'll agree the results are worth it. You can try a demo here:

http://www.leadwerks.com/werkspace/topic/14867-gui-demo/#entry100912

 

blogentry-1-0-78483000-1469994342_thumb.png

 

Just like the Windows implementation, I found it necessary to implement double-buffering. In X11 this is accomplished with the use of an extension called "xdbe". The documentation for usage of this feature is quite extensive and it's difficult to track down any working examples. Digging into reference material from 1995 really made me feel like an archaeologist, but ultimately I finally got it working and you can see the results. There's absolutely no flickering and because Leadwerks GUI is extremely good at rendering only the part of the screen that requires updating, it's super fast.

 

This library could be extremely helpful to developers making cross-platform desktop applications, especially for Linux. None of the existing GUI libraries are very good for writing modern applications. QT has a complicated build process that is difficult to integrate into existing software, and GTK has an asynchronous design that makes development very difficult. The system I am implementing provides fast performance, resolution-independent rendering, and best of all creating a new widget just involves modifying a simple Lua script.

  • Upvote 9
 Share

6 Comments


Recommended Comments

I've got rounded rectangles figured out now. I probably will skip gradients on Linux for now. X doesn't support them, although the XRender extension can display them using an image. Right now I'm getting everything done that I need in pure X, using one extension for double-buffering.

 

The first usage of this will be to swap out the GUI in Game Launcher with this, on both Windows and Linux.

  • Upvote 2
Link to comment

This will be just great as there is no easy descent GUI in Linux that I know of. Either they are to bloated with tons of more or less weird stuff or to simple to use for any real task.

Link to comment

Do you plan to use the new GUI system to be used in the editor too at some point?

Yes, we are going to entirely replace the GUI. Hopefully without changing any of the editor code at all.

Link to comment

Yes, we are going to entirely replace the GUI. Hopefully without changing any of the editor code at all.

 

I hope you add improvements while you're back in the editor's code. :)

 

Overall, really cool. Super excited for this!

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...