1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-28 07:23:13 -04:00
Commit Graph

213 Commits

Author SHA1 Message Date
Emil Ernerfeldt
6643713cc0 Remove Context::is_desktop 2023-11-07 09:30:00 +01:00
Emil Ernerfeldt
8aa14d2fae Allow changing titles 2023-11-06 20:14:24 +01:00
Emil Ernerfeldt
a52d38312c MAIN -> ROOT 2023-11-06 19:19:37 +01:00
Emil Ernerfeldt
6a371e59cb Define a fast ViewportMap type 2023-11-06 19:13:00 +01:00
Emil Ernerfeldt
39f13b4551 Hide close-button for child viewports by default 2023-11-06 10:51:56 +01:00
Emil Ernerfeldt
3cb8f49b46 ViewportId now wraps Id 2023-11-03 15:02:51 +01:00
Emil Ernerfeldt
47e7b9d2dc Minor naming cleanup 2023-11-03 14:09:36 +01:00
Emil Ernerfeldt
f14fa1663e rename pair to id_pair 2023-11-03 13:45:44 +01:00
Emil Ernerfeldt
256ad734b4 More cleanup 2023-11-03 13:36:12 +01:00
Emil Ernerfeldt
1f0fc7a005 format let-else statements 2023-11-03 13:15:21 +01:00
Emil Ernerfeldt
9fd65ad21e Rename render to viewport_ui_cb to avoid confusion 2023-11-03 12:09:09 +01:00
Emil Ernerfeldt
51b083a896 Misc code cleanup 2023-11-03 11:37:09 +01:00
Emil Ernerfeldt
0df4b493fb Better error reporting 2023-11-03 11:36:07 +01:00
Konkitoman
75e6d3c85d Fix crash on eframe wgpu when rendering a sync viewport in a sync viewport
Better names
2023-11-02 11:18:39 +02:00
Emil Ernerfeldt
46febb4af1 Fix crash during shutdown 2023-11-02 09:07:38 +01:00
Emil Ernerfeldt
9749e1ea6d Move Rc<RefCell<……>> outside of struct Viewports 2023-11-02 09:05:19 +01:00
Konkitoman
76d3873b47 Better names 2023-11-01 21:27:27 +02:00
Konkitoman
2b8e5b5896 Fix crash when rendering a sync viewport in a sync viewport 2023-11-01 21:00:14 +02:00
Emil Ernerfeldt
e5dab1eec9 Less RefCell in parameters 2023-11-01 19:04:16 +01:00
Emil Ernerfeldt
7340acf7b3 Less RefCell in parameters 2023-11-01 19:03:43 +01:00
Emil Ernerfeldt
2eb1240648 Less RefCell in parameters 2023-11-01 19:02:46 +01:00
Emil Ernerfeldt
7c1af06cc9 Less RwLock 2023-11-01 19:00:57 +01:00
Emil Ernerfeldt
9fce858c5f Less RwLock in parameters 2023-11-01 18:52:00 +01:00
Emil Ernerfeldt
3d1ee1bafa Replace some Arc with Rc to make it clear what is thread-local 2023-11-01 18:45:16 +01:00
Emil Ernerfeldt
ec39563183 Use less RwLocks and Arcs in public interfaces 2023-11-01 18:43:13 +01:00
Emil Ernerfeldt
521678b5d9 Simplify another function signature 2023-11-01 18:35:17 +01:00
Emil Ernerfeldt
f6c5e71870 Simplify function signature 2023-11-01 18:27:02 +01:00
Emil Ernerfeldt
abc70ccf9c Misc code cleanup 2023-11-01 18:19:19 +01:00
Emil Ernerfeldt
678a3b035e Replace RwLock with RefCell in thread_local 2023-11-01 18:19:01 +01:00
Emil Ernerfeldt
cc31695c03 Remove unused use statment 2023-11-01 17:02:02 +01:00
Konkitoman
d6c2f3e8f3 Fix pixels per point for multiples viewports
Fix ./scripts/check.sh errors
2023-10-22 17:15:21 +03:00
Konkitoman
84ef02d9f5 eframe WGPU:
* Fix msaa and depth textures for multiples viewports
* Fix panic when the width or height was 0
2023-10-20 18:40:11 +03:00
Konkitoman
9e89188ebe Fix trying to render not existent viewport resulting in 100% cpu usage 2023-10-19 20:05:21 +03:00
Konkitoman
4f1696cf9c big refractor
egui:
* removed FullOutput::repaint_after
* now for redraw only request_repaint_callback is used!
* now on every Context::request_repaint() will repaint only once
* exposed Context::requested_repaint and Context::requested_repaint_last_frame

eframe:
* now event result is returned as EventResult insted of Vec<EventResult>
* fix to many redraw requests

----:
* fix egui not waking when a repaint was from other thread
* now every thing feels more responsive!
2023-10-19 15:53:38 +03:00
Konkitoman
b1e7fafe70 egui:
* now every viewport has his own frame_nr

eframe:
* some refactoring
* now on Windows spinner will make the async viewport refresh, this problem was only for async viewport in Windows

* problem found there are two redraw systems, one was broken now is fixed, the one that was broken on Linux X11 was not needed, but for Windows both are needed!
1: The egui repaint_callback system
2: The egui repaint_after from FullOutput
2023-10-18 18:47:16 +03:00
Konkitoman
7f1a1e3b2e Now in ViewportBuilder has close_button and drag_and_drop enabled by default!
Fix Windows not rendering a sync viewport in a sync viewport
2023-10-18 14:50:42 +03:00
Konkitoman
954366ef7f eframe: refactor code to be more compact and faster 2023-10-11 21:08:07 +03:00
Konkitoman
287f7041f6 Fix typos and expose Context::is_desktop 2023-09-30 10:22:17 +03:00
Konkitoman
7caa042b92 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-30 09:39:45 +03:00
Konkitoman
73f14c9b0a Update crates/eframe/src/native/run.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-09-28 19:04:37 +03:00
Emil Ernerfeldt
9a947e5547 Final image API doc tweaks 2023-09-27 16:40:26 +02:00
Emil Ernerfeldt
35945dea46 Misc code cleanup (#3398)
* eframe README: explain how to enable copy/paste

* Implement Debug for a couple of structs

* Code cleanup

* Better docs

* profile ron serialization

* CI: Allow "exclude from changelog" as the only label
2023-09-27 09:06:17 +02:00
Simon
4986b35701 Add NativeOptions::window_builder for more customization (#3390)
* added a window builder hook for more customization

* `EFrame` -> `eframe`

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-09-27 08:52:49 +02:00
Emil Ernerfeldt
b3e19f5b7d Move App::persist_window to NativeOptions and App::max_size_points to WebOptions (#3397)
* Move `App::persist_window` to `NativeOptions`

* Move `App::max_size_points` to `WebOptions`

* Build fixes
2023-09-27 08:48:48 +02:00
Konkitoman
8fad6b761d Now we use egui::ColorImage insted of (u32, u32, Vec<u8>) 2023-09-27 01:06:56 +03:00
Konkitoman
449f38adf2 This is a temporary fix to not unsafe impl Sync + Send for backends
The problem is that when we call Context::create_viewport_sync can be on any thread because egui::Context is Sync + Send but the backend is not!
So we want the callback to the backend to be thread local!

The problem that this adds is that now you cannot create more then one egui::Context,
 because the thread local variabile is static and i don't know how to store a non static LocalKey on egui::ContextImpl
2023-09-27 00:21:06 +03:00
Konkitoman
38e00e2ea2 refactor eframe viewport sync rendering for glow and wgpu 2023-09-26 22:56:46 +03:00
Konkitoman
5c8c56c1b8 rename the events that are result of events event_result 2023-09-26 19:50:11 +03:00
Konkitoman
e5783127f4 Fix max_texture_side for the main viewport was alwats set to 0 2023-09-26 19:45:12 +03:00
Konkitoman
43ad25a4d9 Renamed gl_window to glutin_ctx in init_run_state and initializate max_texture_side, and now on any egui_winit has max_texture_side set 2023-09-26 18:59:42 +03:00