egui/examples
Ted de Munnik 3af907919b
Use `profiling` crate to support more profiler backends (#5150)
Hey! I am not sure if this is something that's been considered before
and decided against (I couldn't find any PR's or issues).

This change removes the internal profiling macros in library crates and
the `puffin` feature and replaces it with similar functions in the
[profiling](https://github.com/aclysma/profiling) crate. This crate
provides a layer of abstraction over various profiler instrumentation
crates and allows library users to pick their favorite (supported)
profiler.

An additional benefit for puffin users is that dependencies of egui are
included in the instrumentation output too (mainly wgpu which uses the
profiling crate), so more details might be available when profiling.

A breaking change is that instead of using the `puffin` feature on egui,
users that want to profile the crate with puffin instead have to enable
the `profile-with-puffin` feature on the profiling crate. Similarly they
could instead choose to use `profile-with-tracy` etc.

I tried to add a 'tracy' feature to egui_demo_app in order to showcase ,
however the /scripts/check.sh currently breaks on mutually exclusive
features (which this introduces), so I decided against including it for
the initial PR. I'm happy to iterate more on this if there is interest
in taking this PR though.

Screenshot showing the additional info for wgpu now available when using
puffin

![image](https://github.com/user-attachments/assets/49fc0e7e-8f88-40cb-a69e-74ca2e3f90f3)
2024-12-16 09:15:54 +01:00
..
confirm_exit Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_3d_glow Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_font Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_font_style Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_keypad Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_style Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
custom_window_frame Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
file_dialog Update some crates to fix CI (#5456) 2024-12-10 17:16:38 +01:00
hello_android Android support for eframe (#5318) 2024-12-12 19:24:26 +01:00
hello_world Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
hello_world_par Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
hello_world_simple Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
images Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
keyboard_events Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
multiple_viewports Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
popups Add `ComboBox::close_behavior` (#5305) 2024-10-29 12:39:44 +01:00
puffin_profiler Use `profiling` crate to support more profiler backends (#5150) 2024-12-16 09:15:54 +01:00
screenshot Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
serial_windows Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
user_attention Update MSRV to 1.80 (#5457) 2024-12-10 16:09:03 +01:00
README.md examples/README.md: explain that the examples are for master 2023-02-08 20:34:43 +01:00
run_all.sh Fix up some examples (#3614) 2023-11-23 12:58:44 +01:00

README.md

egui and eframe examples

All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.

There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.

Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.

Note that all the examples on master are for the latest master version of egui.

If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.