Commit graph

113 commits

Author SHA1 Message Date
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
Emil Ernerfeldt
4f8dcf9a27 Augment list of fedora dependencies
Taken from https://github.com/emilk/egui_template/pull/24
2021-09-02 21:25:38 +02:00
Emil Ernerfeldt
ce19e10258 REAMDE: add link to egui docs about immediate mode 2021-08-23 21:48:38 +02:00
Emil Ernerfeldt
661f0d71a7
Add libssl-dev to apt-get install path (#635) 2021-08-20 14:37:14 +02:00
Emil Ernerfeldt
734ec9dc5a Add link to amethyst_egui 2021-08-18 12:46:59 +02:00
Emil Ernerfeldt
d6299bcd91 Expand egui_web/README.md with list of shortcomings 2021-08-16 21:17:15 +02:00
Emil Ernerfeldt
9bbcfd5996 Fix typo
Closes #567 #617
2021-08-15 17:02:28 +02:00
Luca
a1c5ce05f7
readme: add egui_glfw_gl (#586) 2021-07-29 22:14:17 +02:00
Emil Ernerfeldt
4feee59f84 Improve README files for all crates 2021-07-29 22:04:20 +02:00
Emil Ernerfeldt
326da7a0d7 README: Clean up the integration section 2021-07-29 21:58:50 +02:00
Emil Ernerfeldt
9b1a8c9e00 Add link to egui-tetra 2021-07-29 01:33:55 +02:00
Emil Ernerfeldt
94937a33e8 Add link to ggez-egui 2021-07-28 17:52:05 +02:00
Emil Ernerfeldt
52d187ab5f Add godot-egui to README.md 2021-07-23 11:04:55 +02:00
Emil Ernerfeldt
d8b2b50780
Add libxkbcommon-dev to list of linux deps (#549)
Closes https://github.com/emilk/egui/issues/545
2021-07-06 19:33:37 +02:00
Emil Ernerfeldt
d807451348 Release 0.13.0 - Better panels, plots and new visual style 2021-06-24 20:00:06 +02:00
Benjamin Bouvier
e22c242d17
Use ab_glyph instead of rusttype for font rendering (#490)
* Use ab_glyph instead of rusttype for font rendering

* address review feedback
2021-06-24 12:13:57 +02:00
Emil Ernerfeldt
ef36cac422 Improve misc docs 2021-06-12 22:12:45 +02:00
Emil Ernerfeldt
ec6268e4ac egui_web: document how to fill the full width of the browser 2021-06-03 18:56:37 +02:00
Emil Ernerfeldt
6468b2b84e
Implement efficent scrolling of large content (#457) 2021-06-03 18:48:45 +02:00
ilya sheprut
9dd23b44e0
readme: add nannou_egui (#379) 2021-05-12 13:29:37 +02:00
Emil Ernerfeldt
7b0f991b20 Improve docs concerning custom fonts, themes and accessibility
Closes https://github.com/emilk/egui/pull/370
Closes https://github.com/emilk/egui/issues/372
2021-05-11 14:56:27 +02:00
crumblingstatue
e991a1c310
Fix typo in README.md (#340) 2021-04-29 19:31:24 +02:00
ilya sheprut
d6de19b507
Mention macroquad backend in the readme (#308) 2021-04-15 10:20:04 +02:00
follower
0353f40dd5
Typo fix: "occational" -> "occasional" (#286) 2021-04-08 22:22:58 +02:00
pixeljoelson
b028e708e0
fixed typo in README.md (#275) 2021-04-05 09:56:58 +02:00
Emil Ernerfeldt
33a4058381 Add comment about Firefox CPU usage in FAQ 2021-04-02 09:24:34 +02:00
Emil Ernerfeldt
94baf98eab Add a galley cache to Fonts to avoid doing the same layout each frame 2021-03-29 22:49:48 +02:00
Emil Ernerfeldt
de439b6e21 Deprecate old Slider constructors in favor of Slider::new 2021-03-27 16:07:18 +01:00
Emil Ernerfeldt
405ae3bcee Add link to https://github.com/hakolao/egui_winit_vulkano 2021-03-21 16:09:44 +01:00
Emil Ernerfeldt
24b3cd021f Add demo app instructions for Defora Rawhide
Closes https://github.com/emilk/egui/issues/235
2021-03-21 15:28:00 +01:00
Emil Ernerfeldt
07a17dc6cf Sort 3rd party integrations and add link to egui_vulkano 2021-03-08 22:57:45 +01:00
Emil Ernerfeldt
fdb1aa6bec improve documentation 2021-02-28 18:59:46 +01:00
Emil Ernerfeldt
fc8b27807c Add discussion about the pros and cons of immediate mode GUIs 2021-02-11 19:29:05 +01:00
Emil Ernerfeldt
e5233d2268 Add link to egui_winit_ash_vk_mem crate 2021-02-09 18:38:37 +01:00