5 releases (3 breaking)

0.4.0 Mar 20, 2024
0.3.0 Nov 18, 2023
0.2.0 Nov 18, 2023
0.1.1 Jul 28, 2022
0.1.0 Jan 14, 2022

#495 in GUI

MIT license

46KB
58 lines

gtk4-glium

Use Glium to render with OpenGL on Gtk4 windows, all in Rust.

Example

For a complete example, see examples/triangle.rs.

Triangle example

Quick Start

let facade = GtkFacade::from_glarea(&glarea);

glarea.connect_render(move |_glarea, _glcontext| {
    let context = facade.get_context();
    let mut frame = Frame::new(context.clone(), context.get_framebuffer_dimensions());

    frame.clear_color(0.0, 0.0, 0.0, 1.0);

    frame.finish().unwrap();
    Inhibit(true)
});

Authors

Dependencies

~22–40MB
~723K SLoC