I was wondering if anyone that might be developing anything with Opengl in Java:
What wrapper API are you using? (Xith, jME, JOGL, LWJGL, etc)
If your game has an ingame gui system, what api are you using for it? I'm not talking about Swing for buttons and what not. I am talking about in game menus, buttons, etc.
I have tried so many different Java Opengl implementation my head hurts. And none of them are perfect. But I would like to be able to use some sort of GUI for in game menu's, options, etc but none of the implementations have any good solutions for this. A couple are even trying to say to use Swing on the opengl context. Ugh! How horrible of an idea is that.
Originally posted by Steven Bell: You might want to look at this. I haven't finished it, but I think you might have to wait for the next article to get into the HUD stuff. Maybe something to look forward to though.
I've already seen that. It really has nothing to do with my question. Greg has been working with a couple of the jME guys on making LWJGL work with Swing/SWT. That is not what I want. Thanks for the link though. Others might find that useful.
Originally posted by Ernest Friedman-Hill: JOGL rocks all up and down, as far as I'm concerned. Have you had any problems with it? After having used GL4Java, Java3D, and my own home-grown library, JOGL far and away wins my heart.
No HUD, not a game.
Yes, I have used JOGL. But again, no in game UI. Also, I have a need in one of my apps to use a complex GUI with a glcontext in a panel/canvas. I have used both the GLCanvas and GLJPanel and GLJPanel is tons slower than the GLCanvas, but with GLCanvas I run into Lightweight/Heavyweight issues with rendering the other controls using all Swing. Have you ever looked at how they render opengl on a Swing JPanel? It is so hacked. There are so many issues with Java and Opengl that you just don't run into using C++ and something like QT or wxWidgets.
I developed an app with a friend of mine using gl4java and it was good in its day, but man did it have some problems. The least of which not being the coordinate system being reversed.
Originally posted by Gregg Bolinger: It is so hacked. There are so many issues with Java and Opengl that you just don't run into using C++ and something like QT or wxWidgets.
Yeah, the fundamental problem is that by the time JOGL, gl4java, or whatever gets involved, the window has already been allocated. I'm not a Windows guy -- most of my work is developed on and for Linux -- but on X/Windows, the only time you get a chance to choose the GL-relevant window features (depth buffer, bit planes, etc) is before the window is created. So the only way to write a GL api for Java that works on all X servers is to allocate a new X/Window and overlay it onto the one Java creates for your JFrame (or whatever.) This is why it's an enormous hassle to have lightweight components show up on top of a GL window -- because Java's busy drawing behind the GL window.
But the GL app I work on has a GLCanvas in the middle of a JFrame, with menus on top, a JComboBox on the bottom, and tooltips all around, and there are just a few lines of code here and there to make sure all the popups and tooltips use heavyweight windows, and then everything works. I haven't seen this as a real limitation.
Hmmm. So, if there's no HUD library for JOGL, maybe we could write one... there's kind of a fun project, yeah?
That would be a *fun* project. There is a bit more to it than just building a HUD though. Push buttons, textboxes, etc, all being rendered with opengl and processing events. It would be an undertaking. The JME guys are working on one for their API but it is in very early stages right now. Looks pretty nasty too.
author and iconoclast
Hi, I'm running joglui. I justed started working on a GUI System similar to Crazy Eddies or jMEs internal GUI but based on JOGL. I did not publish any release yet... Maybe you check it out in a few weeks (or consider to join the project, which would double the manpower ).
- What wrapper API are you using? (Xith, jME, JOGL, LWJGL, etc)
I use LWJGL and JOGL for my 2D game engine.
- If your game has an ingame gui system, what api are you using for it? I'm not talking about Swing for buttons and what not. I am talking about in game menus, buttons, etc.
I use my own GUI, GTGE GUI, you can take a look at http://www.goldenstudios.or.id/products/utilities/gui/ It's component designed for gaming, I haven't update it recently, but I tried it with my game engine and it's working just fine with both LWJGL and JOGL. Basically it's only a sprite in game that looks like a component, so it's depend only by the graphics engine to render the image (component), not related with swing/awt/etc, only need graphics engine to draw the component and input engine to take input.
You could try it out if you like, and tell me what you think later if you decide to try it.