1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

egui_glium correct texture filtering (#1962)

* correct texture filter in egui_glium

* update example

* cargo fmt

* rename UserTexture
This commit is contained in:
Tomáš Král
2022-08-25 08:05:58 +02:00
committed by GitHub
parent d5933daee5
commit f3f6946eb2
2 changed files with 52 additions and 15 deletions

View File

@@ -16,7 +16,9 @@ fn main() {
// Allow us to share the texture with egui:
let glium_texture = std::rc::Rc::new(glium_texture);
// Allocate egui's texture id for GL texture
let texture_id = egui_glium.painter.register_native_texture(glium_texture);
let texture_id = egui_glium
.painter
.register_native_texture(glium_texture, egui::TextureFilter::Linear);
// Setup button image size for reasonable image size for button container.
let button_image_size = egui::vec2(32_f32, 32_f32);