mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Rename Egui to egui
Also update iamges in README.md
This commit is contained in:
@@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Fixed 🐛
|
||||
|
||||
* Fix a bug where key releases weren't sent to Egui
|
||||
* Fix a bug where key releases weren't sent to egui
|
||||
* Fix `set_window_size` for non-native `pixels_per_point`.
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "egui_glium"
|
||||
version = "0.7.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "Bindings for using Egui natively using the glium library"
|
||||
description = "Bindings for using egui natively using the glium library"
|
||||
edition = "2018"
|
||||
homepage = "https://github.com/emilk/egui"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
# egui_glium
|
||||
|
||||
This crates provides bindings between [Egui](https://crates.io/crates/egui) and [glium](https://crates.io/crates/glium) which allows you to write GUI code using Egui and compile it and run it natively, cross platform.
|
||||
This crates provides bindings between [egui](https://crates.io/crates/egui) and [glium](https://crates.io/crates/glium) which allows you to write GUI code using egui and compile it and run it natively, cross platform.
|
||||
|
||||
@@ -284,7 +284,7 @@ pub fn run(mut app: Box<dyn epi::App>) -> ! {
|
||||
|
||||
glutin::event::Event::WindowEvent { event, .. } => {
|
||||
input_to_egui(event, clipboard.as_mut(), &mut input_state, control_flow);
|
||||
display.gl_window().window().request_redraw(); // TODO: ask Egui if the events warrants a repaint instead
|
||||
display.gl_window().window().request_redraw(); // TODO: ask egui if the events warrants a repaint instead
|
||||
}
|
||||
glutin::event::Event::LoopDestroyed => {
|
||||
app.on_exit();
|
||||
|
||||
@@ -43,7 +43,7 @@ const VERTEX_SHADER_SOURCE: &str = r#"
|
||||
1.0 - 2.0 * a_pos.y / u_screen_size.y,
|
||||
0.0,
|
||||
1.0);
|
||||
// Egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
// egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
v_rgba = linear_from_srgba(a_srgba);
|
||||
v_tc = a_tc;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ impl Painter {
|
||||
let height_in_points = height_in_pixels as f32 / pixels_per_point;
|
||||
|
||||
if let Some(texture) = self.get_texture(triangles.texture_id) {
|
||||
// The texture coordinates for text are so that both nearest and linear should work with the Egui font texture.
|
||||
// The texture coordinates for text are so that both nearest and linear should work with the egui font texture.
|
||||
// For user textures linear sampling is more likely to be the right choice.
|
||||
let filter = MagnifySamplerFilter::Linear;
|
||||
|
||||
@@ -208,7 +208,7 @@ impl Painter {
|
||||
u_sampler: texture.sampled().magnify_filter(filter).wrap_function(SamplerWrapFunction::Clamp),
|
||||
};
|
||||
|
||||
// Egui outputs colors with premultiplied alpha:
|
||||
// egui outputs colors with premultiplied alpha:
|
||||
let color_blend_func = glium::BlendingFunction::Addition {
|
||||
source: glium::LinearBlendingFactor::One,
|
||||
destination: glium::LinearBlendingFactor::OneMinusSourceAlpha,
|
||||
@@ -227,7 +227,7 @@ impl Painter {
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
// Egui outputs triangles in both winding orders:
|
||||
// egui outputs triangles in both winding orders:
|
||||
let backface_culling = glium::BackfaceCullingMode::CullingDisabled;
|
||||
|
||||
// Transform clip rect to physical pixels:
|
||||
@@ -273,7 +273,7 @@ impl Painter {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// user textures: this is an experimental feature.
|
||||
// No need to implement this in your Egui integration!
|
||||
// No need to implement this in your egui integration!
|
||||
|
||||
pub fn alloc_user_texture(&mut self) -> egui::TextureId {
|
||||
for (i, tex) in self.user_textures.iter_mut().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user