Is there any widget library for OpenGL?

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?

Check that out.

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).

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().

1 Like

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.

You might find this interesting also GitHub - imgui-rs/imgui-rs: Rust bindings for Dear ImGui

1 Like

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

1 Like