Crates.io | gtk4_glium |
lib.rs | gtk4_glium |
version | 0.4.0 |
source | src |
created_at | 2022-01-14 22:12:04.14106 |
updated_at | 2024-03-20 21:10:12.274892 |
description | Use Gtk4 and Glium together |
homepage | https://remcokranenburg.com |
repository | https://github.com/remcokranenburg/gtk4-glium |
max_upload_size | |
id | 514090 |
size | 94,112 |
Use Glium to render with OpenGL on Gtk4 windows, all in Rust.
For a complete example, see examples/triangle.rs
.
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)
});