I need to learn how to render GUI in LWJGL, and I don’t really want to write my own GUI API, so are there any Nifty tutorials out there? I know there’s a jMonkeyEngine one, but I’m using LWJGL, so…I need a tutorial which teaches how to use Nifty for LWJGL. Any ideas? Answers would be much appreciated. Thanks in advance
LWJGL 2 or 3?
EDIT:
If you are using LWJGL3, LWJGL3 has got built in GUI Library: NanoVG
Hmm there was example code for NanoVG I saw somewhere, not sure where it is now.
Hi
This one is a bit old:
Please look at the wiki.
Thanks, both of you. I’m gonna go with NanoVG
NanoVG seems to require a lot more code than Nifty GUI to draw a widget :s
Yes. Nifty or TWL are far better suited. NanoVG is_not a GUI library!
It’s like saying OpenGL is a render engine.
NanoVG is suited to be the technology used to realize the rendering backend of a GUI library. But it is only about the renderig aspect and only about vector graphics primitives (drawing circles, paths, rectangles, …) and rendering text. A real GUI framework has also many more aspects such as input, focus state, animation/transition. And every GUI framework provides the user with abstractions over widgets/controls that the user can build her GUI with, either programmatically or descriptively.
I would suggest using Nifty or TWL.
For those interested in investigating NanoVG for GUI applications perhaps checking out blendish / OUI is pertinent for inspiration.
Now, how awesome is that?! Thanks for mentioning!
I love the Blender UI. Would be perfect for developing the UI of a custom tool.
Please, Spasi, if you read this, add Blendish and OpenUI as LWJGL bindings!
@KaiHH I think porting blendish / OUI to Java as a 3rd party library using the LWJGL NanoVG bindings would be best as it’s rather specific and requires larger amount of resources that aren’t appropriate for LWJGL inclusion due to the size of the blender icon SVG resources. It shouldn’t be too bad since there is a roadmap and working implementation to examine.