Hi everyone,
I’m teaching myself JOGL right now and am trying to produce “proof-of-concept” code to do various game-related things.
Right now, I’m trying to integrate a GUI into a simple JOGL application. I’m just looking to put some buttons on or next to a GLCanvas. There are a few options that I can think of, but I’m not certain if they’ll work or what’s the best. Any guidance (even just links to other discussions) is appreciated!
-
Use Java2D with JOGL, using a GLJPanel rather than a GLCanvas. From what I’ve read, this would work, but there may be performance issues, lightweight/heavyweight mixing issues, etc.
-
Draw the buttons as textured objects that are at fixed locations in the camera’s field of view. They would detect when the mouse is clicked on them or when it hovers over them. I haven’t seen this mentioned anywhere online, so might it be an extremely stupid idea?
-
Use an API such as FengGui to do it. This might be easier, but these APIs also seem to come with their own bugs and limitations that I’d have to learn about as well.
Any recommendations are appreciated. Thank you.