Cross platform GUI frameworks with an OpenGL canvas

Hey guys

Lately I have been thinking about a series of editors I would like to develop. These editors’s main purpose is to make developing games with Java easier and faster. For example, I have been thinking about editors like a gEdit/Geany-like notepad for Java specificly, a 3D map editor for both game maps and terrains, a 3D tree or plant generator and so on.

I am able to do all of this with C# and OpenTK no problem. But see, here is the thing. I can do all of this for Windows, but I do prefer to develop for Mac and Linux as well since I am aiming at developing games in Java and OpenGL. And since Java is cross platform, it would like it if my editors are also cross platform. Unfortunately, OpenTK doesn’t come with a working GTK# widget (and there have been some out there). Otherwise I wouldn’t have feel the need to start this topic in the first place. I could develop editors that do not use OpenGL like a text editor or something but the whole thing would be pointless if I cannot do the same for 3D or 2D editors.

So my question to you guys is, do you know any cross platform GUI frameworks that have a OpenGL canvas I could use to develop 3D or 2D editors with? I heard something about JavaFX having some kind of canvas that look like’s HTML5’s but I thought that one is 2D only. Oh that being said, it does not nesecarily have to be in Java. If you know frameworks for other languages it is fine by me too.

Thanks in advance!
The Bone Jarmer

Nifty GUI and Themable Widget Library are Java UI/widget libraries that have a LWJGL rendering backend (Nifty also has JOGL).
Your ideas sound however very vague, ranging from a simple text editor to 2D and 3D digital content editors. And every solution should render using OpenGL? Why?
What exactly do you need/want to accomplish in the next ten years of development time that will cost you this?
Are there maybe already tools available to do the job (better)? I mean, let alone developing a text editor nowadays where we have TextMate and Sublime Text is really really pointless.
Did you look at the content creation pipeline of JMonkeyEngine? They have a pretty good development environment, too.
Also, for 2D or 3D content creation editors it is a good option to use OpenGL only to display the content/3D view and have all knobs and sliders and buttons implemented using some other windowing toolkit, such as Swing or SWT.
You can embed OpenGL easily inside SWT and also in Swing using a GLCanvas (both in JOGL and LWJGL2).

Ah thanks!

I was afraid these kind of questions would come haha. I can answer them but I wont. These things are worth another topic because it doesn’t really have anything to do with this topic. Forget about my motivations for now, there will come a day that I will dicuss them. But preferably not in this topic. :wink:

Yeah, sorry for asking. :slight_smile:
Just wanted to warn that doing a thing like a 2D or 3D editor is a massive massive undertaking that takes years to completion before it even being remotely usable to a sufficiently large set of people. Even building an Eclipse plugin (which may also be a solution to you), to take advantage of the existing Eclipse platform, can take years to reach a point where it is actually usable and valuable/helpful to others. :slight_smile:

That my friend is something I do not entirely agree with. I made a 3D map editor for the engines Dark Basic and Dark GDK once (both engines are developed by the company The Game Creators who are located in the UK) and that took me merely a couple of months. It worked like a charm and did everything I wanted it too. Unfortunately, it was done with Dark GDK.net’s WinForms component (I was just starting out as software developer with VB.net so I never learnt OpenGL) and thus used DirectX 9. For that reason I never published it. Dark Basic is a dead engine anyway because the last update was like 5 years ago. So I don’t mind because the experience was worth it.

Yes, developing an editor for a specific game/application is really a different thing.
But you sounded like you wanted to do a generic 2D or 3D editor to make “game development easier,” which sounds to me like, well, Blender or the CryEngine editor. :slight_smile:

Are you nuts? haha No. Not Blender, but more like this: http://www.thegamecreators.com/?m=view_product&id=2087. It looks like a pain in the ass to do so but it really isn’t that hard. At least, not in Visual Studio. haha That being said, my map editor was general. It may have been developed with a component made for an engine but it exported its maps to XML files. So basicly it was useful for more people than just those who were using Dark Basic or Dark GDK. I’ll take a look at the libraries you showed tomorrow to see what I can do with it.

I recommend checking out Overlap2D as it’s an open source editor and built on LibGDX. You’d have a real jump start taking a look at or working with their existing project and taking it to wherever you’d like.

Hi

I think that KaiHH mentioned the most famous options. LibGDX Scene2D is worth a try too. JogAmp’s Ardor3D Continuation still supports Ardor3D UI. JOGL 2 has a few widgets too but this part of the API requires shaders. PureSwing is no longer maintained, FengGui neither. It’s possible to draw OpenJFX/JavaFX widgets inside a JOGL canvas and vice versa, you can do the same with Swing and SWT too as KaiHH said. JMonkeyEngine has some specific GUI APIs including Tonegui and Lemur (?), you can use Nifty GUI with it too.

Writing an editor can be very time consuming, keep it in mind. I advise you to build a working game first. Your editor can help you to customize it more easily.

Never heard of it before, it looks really well done! Bookmarked their website for later. I am aiming more at 3D than 2D and since this editor is for 2D games I can not really do anything with it right now. Still thanks for your efforts.

Thanks!

Thanks for your concerns, but do not worry about my time. To be honest, games are not my primary target. I am and always have been more interested in creating tools, websites and applications. Eventually I would like to create a game, but I like to do so with editors I made myself to do it as easy and fast as possible. Turning solutions for problems I experience during game development into standalone applications is what I am really trying to archieve. And I would have done it if I haven’t switched engines so often. The map editor I was talking about could have been published if Dark Basic still was under active development. Same goes for XNA. When I finally decided to learn C# and XNA it was declared dead by Microsoft. So it was hardly worth putting effort into.

Except taking the whole GUI / UI interface and architecture and make it your own. Just because the editor is 2D doesn’t mean you don’t have a whole UI / interface + lots of resources under the hood to get a good idea on how to create an asset pipeline and editor and have it working w/ LibGDX. If you want to make it 3D then go for it and create a modified asset pipeline and loader, but the rest of the architecture seems pretty sound though I haven’t taken a look at it in great detail. They are using Ashley which is an entity system implementation which is worth considering, so it should be possible to replace parts of the editor without too much difficulty. Read into why they switched to that and take a look as you’ll probably find that the editor can go in a different direction in an easier manner than traditional OOP. It is well suited to make into whatever you want and you’re not likely to find any other open source editor in Java w/ LibGDX that is better constructed.

I agree with Catharsis, Overlap2D is worth a deep look, a huge part of its source code could be reused to build a 3D game editor. Otherwise, there is the JMonkeyEngine editor based on Netbeans Platform and relying on Blender.

Actually, building a game and an editor at the same time is helpful to be sure than your editor is really capable even though your game can be a simple footprint.

I have some code i’m using in my own engine that can embed javafx in an opengl texture, if you’re interested




I’ve spent a lot of effort on scene2d. It is well suited to desktop and tools development. For example:
http://esotericsoftware.com/

LibGDX’s scene2d works really well for me! I also found a project called VisUI which provides a nice-looking skin and some extensions on top of the original scene2d elements. The project is here: https://github.com/kotcrab/VisEditor/wiki/VisUI

This page helped me to understand the mechanics of layout using the table system for libgdx: https://github.com/EsotericSoftware/tablelayout

[EDIT] Sorry for the huge bump, didn’t realize this thread was old. Oh well, hope these resources are helpful!