Commit graph

146 commits

Author SHA1 Message Date
Emil Ernerfeldt
2ee9ab3151 Added link to egui-glutin-gl 2022-09-27 23:08:43 +02:00
ComLarsic
162210f90e
Add sdl2_egui_platform to the list of integrations (#2011) 2022-09-06 14:28:59 +02:00
Emil Ernerfeldt
2453756782 Fix broken GitHub source links due to #1940 2022-08-20 15:18:02 +02:00
Milo Moisson
cbe22a0371
Update the link to the nannou egui integration. (#1827)
The project has now moved to the official repository. The old is an archived repo.
Thanks
2022-07-21 19:43:42 +02:00
Nazarí González
9c26093fea
Added notan_egui as 3rd party integration (#1741) 2022-06-18 16:10:48 +02:00
John Wells
f8ce51e5aa
Add screen-13-egui link to README.md (#1709) 2022-06-02 20:55:02 +02:00
Emil Ernerfeldt
e6cfa5028e Add link to chinese translation of egui docs 2022-05-29 21:16:32 +02:00
Emil Ernerfeldt
931e716b97
Add egui_wgpu crate (#1564)
Based on https://github.com/hasenbanck/egui_wgpu_backend

`egui-wgpu` is now an official backend for `eframe` (opt-in).

Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it.

Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
Co-authored-by: Sven Niederberger <niederberger@embotech.com>
Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
2022-05-12 09:02:28 +02:00
Emil Ernerfeldt
078be52ff8 README.md: Fix broken links to toggle_switch.rs example code 2022-05-01 15:27:12 +02:00
Emil Ernerfeldt
bb421c7e8a
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe)

* Remove egui_web crate

* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md

* Remove all mentions of egui_web

* Remove epi crate and absorb into eframe

* egui_glow: only use puffin on native

* Remove WASM doc from CI (we don't generate it anyways!)

* Remove eframe::epi and improve eframe docs
2022-04-30 10:44:35 +02:00
Nihaal Sangha
5ea51c3f0b
Fix typo in README (#1533) 2022-04-29 00:36:04 +02:00
Emil Ernerfeldt
a7b6334784 Misc doc improvements 2022-04-13 22:14:34 +02:00
Emil Ernerfeldt
2ae93c40ab
Move examples out of eframe/examples into examples/ (#1486)
* Move examples out of eframe/examples into examples/

Give each example a `Cargo.toml` and `src/main.rs`.
This makes it easier for people to use as templates.

* Update README.md with more deps needed on vanilla Ubuntu
* Install libgtk-3-dev on CI, hoping that will fix something
2022-04-13 16:13:24 +02:00
Zachary Kohnen
d3c002a4e5
Remove FAQs for resolved issues (#1413)
It was noted that the problems with Firefox on Linux/MacOS have been resolved in #1377 and the limitation on the canvas size was lifted in commit 465c96122c
2022-03-23 15:37:50 +01:00
Emil Ernerfeldt
c63bdeab67
Add an example of showing 3D using three-d (#1407) 2022-03-23 11:06:33 +01:00
Emil Ernerfeldt
15254f8235
Remove the single_threaded/multi_threaded feature flags (#1390)
Always use parking_lot for mutexes, i.e. always be multi-threaded.

Closes #1379
2022-03-21 22:20:37 +01:00
Emil Ernerfeldt
6ce8594351 README.md: add links to license files
Closes https://github.com/emilk/egui/issues/1367
2022-03-19 13:34:08 +01:00
Emil Ernerfeldt
6aee4997d4
Add Shape::Callback to do custom rendering inside of an egui UI (#1351)
* Add Shape::Callback to do custom rendering inside of an egui UI
* Use Rc<glow::Context> everywhere
* Remove trait WebPainter
* Add glow::Context to epi::App::setup
2022-03-14 13:25:11 +01:00
Emil Ernerfeldt
52b4ab4e18
Remove egui_glium as a backend for eframe (#1357)
eframe will now always use egui_glow as a native backend.

Part of https://github.com/emilk/egui/issues/1198
2022-03-11 19:14:27 +01:00
Emil Ernerfeldt
31d324932c
Introduce egui::FullOutput, returned from Context::run (#1292)
* Introduce `egui::FullOutput`, returned from `Context::run`
* Rename `Output` to `PlatformOutput`
2022-02-22 17:13:53 +01:00
Tulio Leao
e746e3a58b
Light edits on README.md (#1246) 2022-02-19 10:41:31 +01:00
Emil Ernerfeldt
c1cd47e3a7 README: Add section to FAQ about how to work with async code 2022-02-13 23:04:08 +01:00
Emil Ernerfeldt
f92df7db56 README: Add screenshot to demonstrate the skin-ability of egui 2022-02-13 23:04:08 +01:00
Emil Ernerfeldt
fd267c542e Add a link to smithay-egui 2022-02-04 10:55:14 +01:00
Xu Desheng
1f03f53dc0
Add Bezier Shapes #1120 (#1178) 2022-01-31 20:26:31 +01:00
Emil Ernerfeldt
532990d3dd emilk.github.io -> www.egui.rs 2022-01-30 22:01:33 +01:00
Emil Ernerfeldt
26be0ace1d Tidy up README.md 2022-01-26 17:25:59 +01:00
Emil Ernerfeldt
d5673412dd
Put everything in Context behind the same Mutex (#1050)
* Move all interior mutability from Context to CtxRef and make it a handle
* Rename `CtxRef` to `Context`
* The old `Context` is now `ContextImpl` and is non-pub
* Add benchmark Painter::rect

Co-authored-by: Daniel Keller <dklr433@gmail.com>
2022-01-10 23:13:10 +01:00
Emil Ernerfeldt
b1fd6a44e8
Switch to using glow as the default renderer both on native and the web (#1020)
* Switch to using glow as the default renderer both on native and the web
* Simplify code to find WebGL context for glow
* egui_web: make webgl an opt-in feature
* Stop using deprecated WEBGL_debug_renderer_info
2021-12-31 15:17:55 +01:00
Timo
21fe9316d5
Adding missing package for fedora (#1018)
libxcb-devel
2021-12-30 21:52:05 +01:00
Emil Ernerfeldt
68fca09df9 Improve documentation 2021-12-28 17:34:27 +01:00
Emil Ernerfeldt
c63996179b README.md: add link to discussion of begin/end calls vs closures 2021-12-28 10:05:19 +01:00
Emil Ernerfeldt
ee00214511 Add a badge and link to the official discord server
Closes https://github.com/emilk/egui/pull/990
2021-12-25 16:56:24 +01:00
Emil Ernerfeldt
49e43885ff
Replace Context::begin_frame/end_frame with fn run taking a closure (#872)
* Replace Context begin_frame/end_frame with `fn run` taking a closure
* Create `egui::__run_test_ui` to replace `Ui::__test`
* Add helper `egui::__run_test_ctx` for doctests
2021-11-03 20:11:25 +01:00
Emil Ernerfeldt
e54106e950 Extend contributor list 2021-11-03 19:37:38 +01:00
Emil Ernerfeldt
41f77ba7d7 Clean up some of the new context menus
Follow-up to https://github.com/emilk/egui/pull/543

* Add entry to CHANGELOG.md
* Add entry to contributors in README.md
* Improve documentation
* Simplify demo
2021-10-26 20:16:46 +02:00
Emil Ernerfeldt
a3ba85dbb3 Improve docs 2021-10-23 06:03:45 +02:00
Emil Ernerfeldt
26c6cea117 Credit notable contributors
@n2 @optozorax @quadruple-output @EmbersArc @AsmPrgmC3 @AlexApps99

Chosen for their substantial contributions
2021-10-23 00:02:21 +02:00
AlexApps99
877e89f2ec
Add egui_glow backend as alternative to egui_glium (#685) 2021-10-18 23:13:32 +02:00
Emil Ernerfeldt
96be848e42 rename egui_template to eframe_template 2021-10-18 20:19:43 +02:00
Emil Ernerfeldt
1f5cd482f6
Replace ProggyClean.ttf with Hack-Regular.ttf as default monospace font (#802)
https://github.com/source-foundry/Hack, MIT license
2021-10-17 20:49:28 +02:00
Emil Ernerfeldt
6f699b3391 Replace every ... with … like some sort of crazy person
Also fix some small typos

Closes https://github.com/emilk/egui/pull/736
2021-10-13 11:52:34 +02:00
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium (#735) 2021-09-28 17:33:28 +02:00
Emil Ernerfeldt
52e49bd4ae README: Point to better example in the "how to render 3D" FAQ section 2021-09-20 22:58:26 +02:00
Emil Ernerfeldt
93c2fde1fc Extend section about rendering 3D inside of egui 2021-09-19 20:16:50 +02:00
Emil Ernerfeldt
f2b6edd6db Replace egui_winit_ash_vk_mem with egui-winit-ash-integration in README.md
Closes https://github.com/emilk/egui/issues/707
2021-09-11 09:34:00 +02:00
Emil Ernerfeldt
391bec1170 FAQ: add "How do I render 3D stuff in an egui area?" 2021-09-05 10:18:49 +02:00
Emil Ernerfeldt
5f88d89f74
Faster galley cache (#699)
* Speed up galley cache by only using the hash as key

This hashes the job but doesn't compare them with Eq,
which speeds up demo_with_tessellate__realistic by 5-6%,
winning back all the performance lost in
https://github.com/emilk/egui/pull/682

* Remove custom Eq/PartialEq code for LayoutJob and friends

* Silence clippy

* Unrelated clippy fixes
2021-09-04 10:19:58 +02:00
Emil Ernerfeldt
de1a1ba9b2
New text layout (#682)
This PR introduces a completely rewritten text layout engine which is simpler and more powerful. It allows mixing different text styles (heading, body, etc) and formats (color, underlining, strikethrough, …) in the same layout pass, and baked into the same `Galley`.

This opens up the door to having a syntax-highlighed code editor, or a WYSIWYG markdown editor.

One major change is the color is now baked in at layout time. However, many widgets changes text color on hovered. But we need to do the text layout before we know if it is hovered. Therefor the painter has an option to override the text color of a galley.


## Performance
Text layout alone is about 20% slower, but a lot of that is because more tessellation is done upfront. Text tessellation is now a lot faster, but text layout + tessellation still lands at a net loss of 5-10% in performance. There are however a few tricks to speed it up (like using `smallvec`) which I am saving for later. Text layout is also cached, meaning that in most cases (when all text isn't changing each frame) text tessellation is actually more important (and that's more than 2x faster!).

Sadly, the actual text cache lookup is significantly slower (300ns -> 600ns). That's because the `TextLayoutJob` is a lot bigger (it has more options, like underlining, fonts etc), so it is slower to hash and compare. I have an idea how to speed this up, but I need to do some other work before I can implement that.

All in all, the performance impact on `demo_with_tesselate__realistic` is about 5-6% in the red. Not great; not terrible. The benefits are worth it, but I also think with some work I can get that down significantly, hopefully down to the old levels.
2021-09-03 18:18:00 +02:00
Mohammed Alyousef
d9fd806e94
add fltk-egui as a 3rd party backend crate (#694) 2021-09-03 15:20:34 +02:00