Commit graph

2207 commits

Author SHA1 Message Date
Red Artist
935913b1ec
Add Context::request_repaint_after (#1694) 2022-06-22 13:19:13 +02:00
Michael Birdhouse
1a89cb35e1
Fix uneven table striping (#1680)
* Fix uneven table striping

* simplify the code

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-06-22 12:33:51 +02:00
wucke13
bd5f553c3a
Fix multiple partial updates of the same texture (#1338)
Co-authored-by: Wanja Zaeske <wanja.zaeske@dlr.de>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-06-19 22:49:06 +02:00
Barugon
f5b2363fff
Fix persistence of window position (#1745)
* Fix window position

* Better comment

* Add doc link
2022-06-19 16:13:10 +02:00
Barugon
5b3bff22e2
Make Windows specific code Windows specific (#1747) 2022-06-19 16:12:58 +02:00
Nazarí González
9c26093fea
Added notan_egui as 3rd party integration (#1741) 2022-06-18 16:10:48 +02:00
mitchmindtree
7eeb292adf
Refactor common code in egui-wgpu shader entry points (#1730)
Creates `unpack_color` and `position_from_screen` functions to share
common logic between the alternative vertex shader entry points.
2022-06-11 13:52:06 +02:00
Emil Ernerfeldt
8c7c4c764b
Don't load fonts in doctests (#1711)
I was hoping this would speed up the doctests, but it doesn't really
2022-06-10 14:33:16 +02:00
Emil Ernerfeldt
317436c057
Use dark-light on Mac and Windows (#1726)
* Use dark-light on Mac and Windows

dark-light has a nasty problem on Linux: https://github.com/frewsxcv/rust-dark-light/issues/17

So we made dark-light opt-in in https://github.com/emilk/egui/pull/1437

This PR makes dark-light a default dependency again,
but only use it on Max and Windows.

This is controlled with the new NativeOptions::follow_system_theme.
If this isn't enabled, then NativeOptions::default_theme is used.

* Add eframe::WebOptions
2022-06-09 17:41:59 +02:00
Emil Ernerfeldt
29973e5d02 Make document-features an opt-in dependency 2022-06-09 17:41:37 +02:00
Charles Ray
4525cad7af
Constrain date picker to screen (#1699)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-06-09 16:05:04 +02:00
Zicklag
62a00c4597
Fix bug in egui-wgpu (#1716) 2022-06-09 15:59:43 +02:00
Cisco
8446665b02
Fix on-hover typo in plot module (#1714) 2022-06-09 15:28:18 +02:00
Emil Ernerfeldt
3169ce62d5
Document feature flags using crate document-features (#1725) 2022-06-09 15:27:22 +02:00
Zicklag
218d4d4eea
WGPU PaintCallback Fixes (#1704)
* Expose egui WGPU Textures and Limit Exposed API

This allows paint callbacks to access textures allocated by egui, and
also hides the functions on the `RenderPass` that users should not need
to call.

* Fix WGPU Rendering Bug When Using Paint Callbacks

Depending on the order custom paint callbacks were rendered, some of the
egui meshes would previously not be rendered at all in a seemingly random
fashion.

* Make egui_wgpu::Renderer Functions Public Again
2022-06-02 22:45:54 +02:00
Emil Ernerfeldt
083e20474b
deny warnings on CI and check.sh with -D warnings (#1710) 2022-06-02 21:06:12 +02:00
John Wells
f8ce51e5aa
Add screen-13-egui link to README.md (#1709) 2022-06-02 20:55:02 +02:00
follower
e2bfdbe8b0
egui-wgpu: Ensure docs for winit feature are generated. (#1700)
per https://github.com/emilk/egui/issues/381#issuecomment-839707073
2022-05-31 12:24:12 +02:00
Emil Ernerfeldt
e6cfa5028e Add link to chinese translation of egui docs 2022-05-29 21:16:32 +02:00
Emil Ernerfeldt
ac9faaf1c1 epaint_assert that partial texture update is within texture size 2022-05-29 21:00:49 +02:00
Emil Ernerfeldt
42edb92232 Fix compilation of screenshot example (merge race) 2022-05-29 20:59:39 +02:00
Erdal Acar
7987920f7e
Fix exit handling (#1696) 2022-05-29 20:37:31 +02:00
Emil Ernerfeldt
20c8ee302c
Allow software rendering OpenGL by default (#1693)
Follow-up to https://github.com/emilk/egui/pull/1681
2022-05-29 20:37:19 +02:00
René Rössler
4a7a2d6430
eframe::App::post_rendering (#1591) 2022-05-29 20:33:04 +02:00
Ashley
abff2dcae2
Add some padding to the egui-wgpu uniform buffer for WebGL (#1671)
Required on Chromium
2022-05-28 18:41:01 +02:00
Emil Ernerfeldt
2771c8c3e5 Fix doclinks 2022-05-28 18:09:08 +02:00
Benedikt Terhechte
72e38370fe
Add flag to disable hardware acceleration (#1681)
This is a fix for the behaviour on macOS platforms where any egui app would use the dedicated GPU and consume more power than needed. Not all apps might have dedicated GPU requirements.
2022-05-28 17:53:05 +02:00
Zicklag
1d9524cc59
Re-implement PaintCallbacks With Support for WGPU (#1684)
* Re-implement PaintCallbacks With Support for WGPU

This makes breaking changes to the PaintCallback system, but makes it
flexible enough to support both the WGPU and glow backends with custom
rendering.

Also adds a WGPU equivalent to the glow demo for custom painting.
2022-05-28 17:52:36 +02:00
Emil Ernerfeldt
8173093c67 run cargo check --locked on CI
This ensures the Cargo.lock is up-to-date in PR:s
2022-05-28 17:32:59 +02:00
sy1ntexx
f5cca2a288
Added support for 20 fn keys (#1665) 2022-05-23 17:49:48 +02:00
Emil Ernerfeldt
f2dcdfc22c Fix some broken doc links 2022-05-23 17:25:31 +02:00
Robert Bragg
a5076d4cc4
egui_winit/wgpu: enable Android support (#1634)
* egui-winit: don't assume window available at init

On Android in particular we can only initialize render state once we
have a native window, after a 'Resumed' lifecycle event. It's still
practical to be able to initialize an egui_winit::State early on
so this adds setters for the max_texture_side and pixels_per_point
that can be called once we have a valid Window and have initialized
a graphics context.

On Wayland, where we need to access the Display for clipboard handling
we now get the Display from the event loop instead of a window.

* egui-wgpu: lazily initialize render + surface state

Enable the renderer and surface state initialization to be deferred
until we know that any winit window we created has a valid native window
and enable the surface state to be updated in case the native window
changes.

In particular these changes help with running on Android where winit
windows will only have a valid native window associated with them
between Resumed and Paused lifecycle events, and so surface creation
(and render state initialization) needs to wait until the first
Resumed event, and the surface needs to be dropped/recreated based on
Paused/Resumed events.
2022-05-22 20:24:41 +02:00
Emil Ernerfeldt
fff2008255 Move three-d patch into example Cargo.tom 2022-05-22 18:14:00 +02:00
Sebastian Urban
b2510676b9
Take Glow context using Arc. (#1640)
This allows usage with a Glow context that is passed between threads.
2022-05-22 17:43:30 +02:00
Emil Ernerfeldt
a29154233b Add support for texture filters in WGPU backend 2022-05-22 17:40:56 +02:00
Florian Diebold
5d15e3d367
egui-wgpu: Add ability to register user textures (#1660) 2022-05-22 17:32:54 +02:00
Emil Ernerfeldt
cc148ca895 Add texture filters to changelogs and improve docs 2022-05-22 17:32:38 +02:00
Zicklag
1a9a0d7ec8
Add the Ability to Specify Egui Texture Filters (#1636)
Only works for egui_glow
2022-05-22 16:56:51 +02:00
Emil Ernerfeldt
f3e305a646 Replace TODO: with TODO(emilk): and update code guidelines 2022-05-21 16:53:25 +02:00
Emil Ernerfeldt
3d5e203d86
egui_glow: clear the post-processing render target (#1658) 2022-05-21 16:53:05 +02:00
Emil Ernerfeldt
32ad9c29be Use better names in glow::Painter 2022-05-21 16:03:26 +02:00
Emil Ernerfeldt
aef8a7901f Fix broken link
Closes https://github.com/emilk/egui/issues/1643
2022-05-21 15:42:43 +02:00
Emil Ernerfeldt
d6fd5dec3b
Add single-threaded deadlock detection to RwMutex (#1619) 2022-05-21 14:08:19 +02:00
Emil Ernerfeldt
810b609a80 clippy fixes 2022-05-21 13:04:58 +02:00
Emil Ernerfeldt
934fcd7e99 Add hex_color clipboard fixes to changelogs 2022-05-21 13:04:58 +02:00
Sebastian Urban
5687aa6b50
Request GLSL version 3.30. (#1639) 2022-05-21 12:52:20 +02:00
griffi-gh
27cca111c8
Fix wrong name in egui-wgpu CHANGELOG.md (#1645) 2022-05-21 12:49:37 +02:00
Emil Ernerfeldt
f807a290a4 Release egui-wgpu 0.18.0 2022-05-16 16:39:26 +02:00
Erlend Walstad
f27f67b76b
Make color-hex optional (#1632) 2022-05-16 16:38:14 +02:00
Antti Keränen
b8a5924295
Fix clipboard on Wayland (#1613)
arboard advertises that it works with Wayland, but in reality it only
works with Wayland terminal applications. To make the clipboard work
with applications that draw Wayland surfaces, arboard isn't going to
work.

Copypasta does support Wayland's graphical clipboard, but the usage
isn't documented. However, for the reasons mentioned in #1474 the move
from Copypasta to arboard makes sense.

To resolve the issue, this commit brings in an optional dependency
smithay-clipboard, that is a crate that correctly handles the Wayland
clipboard in graphical applications. It is used by default if a Wayland
window handle is found. If for some reason the handle to the Wayland
window handle cannot be fetched, arboard is used as a backup.
2022-05-16 16:37:41 +02:00