Buttons and labels in/on top of GLCanvas

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Buttons and labels in/on top of GLCanvas

karelknoes
I'm looking forward to your thoughs on how to add gui elements such as buttons and labels to GLCanvas (heavyweight component). For example, we'd like to provide an information panel in/on the canvas when the user selects a model; and add buttons near a selected object that activates different interactions.

The preferred way would be to add Swing elements on top of the GLCanvas. Replacing GLCanvas with GLJPanel would be excellent solution, were it not for a considerable performance hit. We're currently experimenting with a JLayeredPane, but it's all a bit tentative.

An second approach is to add the gui elements as a 2D overlay on top of GLCanvas. A considerable downside of this approach is that it seems we're partially reimplementing Swing (mouse hover/pressed interaction, etc), which adds development time.

A third approach...?