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

273 Commits

Author SHA1 Message Date
Konkitoman
38e00e2ea2 refactor eframe viewport sync rendering for glow and wgpu 2023-09-26 22:56:46 +03:00
Konkitoman
1930d69ae3 Fix the change that change from a Vec to HashMap braked web and pure_glow 2023-09-26 20:34:09 +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
Konkitoman
6a5838c119 Now all sizes are in Vec2 insted of Pos2 2023-09-26 18:33:57 +03:00
Konkitoman
b719e1c030 eframe fix android build 2023-09-26 18:23:37 +03:00
Konkitoman
543a0a2a83 egui, egui_glow, eframe: fix all errors returned by ./scripts/check.sh 2023-09-26 00:45:33 +03:00
Konkitoman
489d8a79c8 egui: fix web app runner 2023-09-26 00:14:26 +03:00
Konkitoman
e453d667e5 egui and eframe now uses more ViewportIdPair 2023-09-26 00:05:04 +03:00
Konkitoman
f4c5378ad3 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-25 23:15:51 +03:00
Emil Ernerfeldt
fdd493d48f Misc cleanup (#3381)
* Give credit to recent big-time contributors in the main README.md

* Better named profiling scopes

* Document everything in memory.rs

* Better doc-strings

* Add a section about dependencies to the main README.md

* Improve egui_extras docs

* fix typos
2023-09-24 09:32:31 +02:00
Konkitoman
8ecd29dea7 eframe: Now WGPU implementation when creating a sync viewport will inherit the icon of his parent
And refactoring and adding some inline documentation
2023-09-20 18:56:38 +03:00
Konkitoman
915d1b6997 Add ViewportIdPair, Viewport, ViewportOutput 2023-09-19 17:55:54 +03:00
Konkitoman
c96197db79 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-19 17:22:31 +03:00
Barugon
c07394b576 Only show on-screen-keyboard and IME when editing text (#3362)
* Remove calls to `set_ime_allowed`

* Allow IME if `text_cursor_pos` is `Some`

* Only call `Window::set_ime_allowed` when necessary

* allow_ime doesn't need to be atomic

* Remove unused imports

* Fix assignment
2023-09-19 14:14:42 +02:00
Sebastian Reinhard
433d1fc239 file_storage: Wrap File in BufWriter (#3353)
When exiting my application, it would freeze for around a minute waiting to finish writing ca. 40MB to file storage.
Some quick profiling revealed that it was spending all that time in `File::write`,
presumably making a large number of system calls writing tiny amounts of data at a time.
We can avoid this by buffering writes using a `BufWriter`, just like we already do with `BufReader`.

With this change, my application takes around 1-2 seconds to exit, with the majority of that time spent serializing `ron`.
I'm sure there are further potential performance improvements there, but this is already an order of magnitude or two better.

I also fixed the call to `log::warn!`, which was using incorrect formatting syntax and not including the error message.
2023-09-18 16:40:29 +02:00
aspect
9c4f55b1f4 Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. (#3349)
* remove Function (eval) from eframe text agent for compatibility with browser extensions.

* cargo fmt on image viewer
2023-09-17 13:25:50 +02:00
Dunfan Lu
d949eaf682 Fix typo in eframe/README.md (#3344) 2023-09-16 12:22:02 +02:00
Emil Ernerfeldt
4b5146d35d Add more profiling scopes (#3332) 2023-09-13 19:32:19 +02:00
Emil Ernerfeldt
fc3bddd0cf Add more puffin profile scopes to eframe (#3330)
* Add puffin profile scopes to the startup and running of eframe

* puffin_profiler example: start puffin right away

* cargo format let-else statements

* More profile scopes

* Add some `#[inline]`

* Standardize puffin profile scope definitions

* standardize again

* Silence warning when puffin is disabled
2023-09-13 09:00:38 +02:00
Konkitoman
fc90a7e7c8 Fix cyclical reference
Removed the last fix because there is not need for it now!
2023-09-11 18:50:17 +03:00
Konkitoman
956c1c3527 Fix memory leak 2023-09-10 15:33:06 +03:00
Konkitoman
a5d4ce84d4 Now eframe glow supports viewport sync icon 2023-09-06 19:16:20 +03:00
Konkitoman
fb80880ff8 * Fix posibile deadlock when sending a viewport command from a sync viewport
* Improve viewports example
2023-09-06 16:30:20 +03:00
Konkitoman
b1189c14ae Now when creating a async viewport, if we not spefify the icon will have his parent icon 2023-09-06 15:58:41 +03:00
Konkitoman
83f82601e8 * Fix warnings
* Refactor eframe wgpu
2023-09-06 15:18:18 +03:00
Konkitoman
fea6ed7878 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-06 13:35:02 +03:00
Emil Ernerfeldt
82704bebbf Update MSRV to Rust 1.70.0 (#3310)
* Update to Rust 1.70

* Fix renamed clippy lint

* Use let-else more

* Code cleanup

* Remove derelict Safety comments

* Enable more clippy lints
2023-09-06 07:59:24 +02:00
Konkitoman
e44c2e6928 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-05 16:19:41 +03:00
Emil Ernerfeldt
67168be069 Improve clippy, and add more docs (#3306)
* Silence a few clippy warnings

* Use named threads

* Remove some deprecated functions

* Document Context and Ui fully

* Use `parking_lot::Mutex` in `eframe`

* Expand clippy.toml files

* build fix
2023-09-05 14:11:22 +02:00
Konkitoman
f30bf519ee Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-05 12:19:02 +03:00
Barugon
1b8e8cb38e eframe::Frame::info returns a reference (#3301)
* Get a reference to `IntegrationInfo`

* Add doc comment

* Change `info` to return a reference

* Clone integration info

* Remove `&`

* Clone integration info in another place
2023-09-05 10:43:39 +02:00
Konkitoman
12eeda0a3f Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-04 16:45:12 +03:00
Emil Ernerfeldt
9e86bb8d6a Add opt-in puffin feature to egui (#3298)
* Add opt-in `puffin` feature to egui

* fix web build

* Fix web for realz
2023-09-04 15:01:22 +02:00
Konkitoman
7c4a85ebda Now in ViewportBuilder, InputState, RawInput: viewport_inner_pos, viewport_outer_pos, viewport_inner_size, viewport_outer_size are stored as inner_pos, outer_pos, inner_size, outer_pos and Now every (i32, i32) is stored as egui::Pos2
Addes some documentation
2023-09-04 14:23:21 +03:00
Konkitoman
4a9e087e92 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-09-04 13:39:08 +03:00
Emil Ernerfeldt
5f742b9aba Improve documentation of eframe, especially for wasm32 (#3295)
* Improve documentation of `eframe`, especially for wasm32

* remove dead code

* fix
2023-09-04 09:55:47 +02:00
Konkitoman
4eb32c6ccf Simplify 2023-09-01 12:09:01 +03:00
Konkitoman
661120dc1d Simplify 2023-09-01 11:52:00 +03:00
Konkitoman
c10a4cd79a Fix: First frame of Context::create_viewport_sync was always skiped because we didn't have a window to draw on!
Changes: Now Context::create_viewport_sync returns T, before was Option<T>
2023-08-31 17:07:39 +03:00
Konkitoman
6618a47c20 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-30 15:03:28 +03:00
Emil Ernerfeldt
70bfc7e09f Add eframe::storage_dir (#3286)
* Add `eframe::storage_dir`

Now you can easily tell where eframe stores its state

* egui_plot: work even without the `serde` featur flag
2023-08-29 15:22:07 +02:00
Konkitoman
51011d1bbd Fix: sync viewport was not updating on windows
Changes: no more manual calls to winit:🪟:Window::request_redraw, in glow or wgpu
2023-08-29 11:01:19 +03:00
Konkitoman
a21cb80f56 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-29 10:00:14 +03:00
Konkitoman
4d01644b33 * Fix example hello_world_par
* Added warning for glow eframe when creating `Context::create_viewport_sync` in other thread, or cannot be rendered!
* Fix clippy warning
2023-08-25 11:22:18 +03:00
Antoine Beyeler
2c5fc5a0a5 Added mime field to DroppedFiles (#3273) 2023-08-23 15:13:47 +02:00
Konkitoman
3b41253442 This should make the viewport to redraw normaly in windows 2023-08-23 14:31:37 +03:00
Konkitoman
dadcd508c9 Fix deadlock when creating a viewport sync in a viewport sync
But will not affect anything because the viewport builders will processed when the async viewport will end
2023-08-23 07:18:16 +03:00
Konkitoman
189e34e3d2 Fix flickering for Context::create_viewport_sync but now will return a Option<T> 2023-08-23 06:20:31 +03:00