Is there any widget library for OpenGL?


#1

Hello! I’d like to use Rust for an OpenGL course (I am a student). So far, glium/glutin and nalgebra are working really great for me.

The thing I am missing is the library for creating widgets for controlling rendering parameters. Something like AntTweakBar, but Rusty :smile:

What would be the easiest way to add simple UI to my OpenGL apps?


#2

Check that out.


#3

Thanks, I’ve tried conrod, and it looks good.

However I have the following problem. I can create a window with gutin and draw my triangles there. I also can create a window with conrod widgets (from examples). But how can I create a window with both widgets and my geometry?

I tried to create two separate windows in different threads, one for geometry and one for widgets, but in this setup the window with geomeyty does not recieve any keyboard events (for that matter, if I create two window with geometry, they also mix up events).


#4

You only need one window. If you want your UI drawn over your geometry, then draw your geometry first using the GliumGraphics instance before you pass it to Ui::draw().


#5

In the end, I was unable to make conrod and raw glium to play nice together. So I ended up storing/reading all the configuration values from a JSON file. Given #[derive(RustcDecodable)], it is a much simpler solution without many dependencies.


#6

You might find this interesting also https://github.com/Gekkio/imgui-rs


#7

Thank you, I’m using this library now :slight_smile: