Commit graph

48 commits

Author SHA1 Message Date
Koute
be9f363c53
egui_winit: support winit with default features disabled (#1971)
* egui_winit: support winit with default features disabled

* Link to the PR in the changelog
2022-08-30 08:49:32 +02:00
Emil Ernerfeldt
3142c52b94
Minor wgpu-web releated stuff (#1977)
* egui_demo_app: remove wgpu and pollster as direct dependencies

* eframe: use same web-sys version as wgpu crate

* Make note that web_sys_unstable_apis is required by the wgpu crate

* Rename the glow web painter in eframe

* Remove trait DummyWebGLConstructor from web_glow_painter.rs

* cargo fmt

* Fix check.sh
2022-08-28 10:58:58 +02:00
Emil Ernerfeldt
b978b06159
Simplify, clean up and speed up CI (#1970)
Use https://github.com/Swatinem/rust-cache
2022-08-27 09:54:47 +02:00
Emil Ernerfeldt
8737933101 Improve documentation and logging 2022-08-20 15:06:43 +02:00
Emil Ernerfeldt
041f2e64ba
Move all crates into a crates directory (#1940) 2022-08-20 10:41:49 +02:00
Emil Ernerfeldt
5d8ef5326b Change build_demo_web.sh option from --fast to --optimize 2022-08-02 09:56:38 +02:00
Emil Ernerfeldt
2500a60062 Code cleanup and improved docs 2022-07-30 18:40:49 +02:00
Emil Ernerfeldt
4e8a6e3370 misc code cleanup 2022-07-29 16:07:26 +02:00
Emil Ernerfeldt
a7012cf8a6
Use pinned version of wasm-bindgen-cli (#1855)
* Use pinned version of wasm-bindgen-cli

* Update wasm-bindgen to 0.2.82

* Call setup_web.sh from scripts that depends on it
2022-07-25 23:02:10 +02:00
Emil Ernerfeldt
bf15bb6e19
Use cargo cranky instead of cargo clippy (#1820)
* Use cargo cranky instead of cargo clippy

cargo cranky (https://github.com/ericseppanen/cargo-cranky)
is a new tool that passes lints specified in a Cranky.toml
to cargo clippy.

This is a possible solution to
https://github.com/rust-lang/cargo/issues/5034

* Remove `-W clippy::all` from `check.sh` (rely on `Cranky.toml` instead)
2022-07-20 12:34:19 +02:00
Emil Ernerfeldt
083e20474b
deny warnings on CI and check.sh with -D warnings (#1710) 2022-06-02 21:06:12 +02:00
Emil Ernerfeldt
f3e305a646 Replace TODO: with TODO(emilk): and update code guidelines 2022-05-21 16:53:25 +02:00
Emil Ernerfeldt
931e716b97
Add egui_wgpu crate (#1564)
Based on https://github.com/hasenbanck/egui_wgpu_backend

`egui-wgpu` is now an official backend for `eframe` (opt-in).

Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it.

Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
Co-authored-by: Sven Niederberger <niederberger@embotech.com>
Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
2022-05-12 09:02:28 +02:00
Emil Ernerfeldt
e82b87ca73
Remove calls to gl.getError in release builds (#1583)
This slows down the web version a lot, especially on some browsers

Publish new web demo
2022-05-05 23:17:33 +02:00
Emil Ernerfeldt
e5ccfedd61 Escape some strings in build_demo_web.sh 2022-04-30 17:18:31 +02:00
Emil Ernerfeldt
9b9c5005d3 CI and check.sh: run cargo doc for all crates 2022-04-30 15:51:46 +02:00
Emil Ernerfeldt
bb421c7e8a
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe)

* Remove egui_web crate

* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md

* Remove all mentions of egui_web

* Remove epi crate and absorb into eframe

* egui_glow: only use puffin on native

* Remove WASM doc from CI (we don't generate it anyways!)

* Remove eframe::epi and improve eframe docs
2022-04-30 10:44:35 +02:00
Emil Ernerfeldt
ed002acc68
Refactor: move things into eframe (#1542)
* Move all epi-related code from egui_glow into eframe

* Move epi stuff from egui-winit into eframe

* Remove mention of epi in egui

* Remove mention of epi in egui_glium

* Remove trait epi::NativeTexture

* Remove confusing mentions of epi

* Refactor egui_web: break up into smaller files

* Clean up feature flags further, and update changelogs

* Clean up check.sh

* Small cleanup of egui_web/Cargo.toml

* Fix dependencies for pure_glow example

* Fix clippy false positive
2022-04-29 08:17:49 +02:00
Emil Ernerfeldt
917f9e1768 Refactor and simplify feature flags 2022-04-11 10:53:16 +02:00
Emil Ernerfeldt
8cf196a34b Use proper shebang for all bash scripts: #!/usr/bin/env bash 2022-04-07 17:34:34 +02:00
Emil Ernerfeldt
7cd285ecbc misc clippy fixes from 1.60.0 2022-04-07 17:03:19 +02:00
Emil Ernerfeldt
bd25526a4f check.sh: fail on rustdoc failure
Same as https://github.com/emilk/egui/pull/1454
2022-04-05 08:07:57 +02:00
Emil Ernerfeldt
15254f8235
Remove the single_threaded/multi_threaded feature flags (#1390)
Always use parking_lot for mutexes, i.e. always be multi-threaded.

Closes #1379
2022-03-21 22:20:37 +01:00
Emil Ernerfeldt
50539bd31a
egui_web: always use the glow painter, and remove the old WebGL code. (#1356)
* egui_web: always use the glow painter, and remove the old WebGL code.
* Clean up the WebPainter trait
* Clarify WebGL1 warning text in color test

The glow painter became standard in egui 0.17, and I've heard no complaints! So let's simplify and go all in on glow.

Part of https://github.com/emilk/egui/issues/1198
2022-03-11 19:15:06 +01:00
Emil Ernerfeldt
52b4ab4e18
Remove egui_glium as a backend for eframe (#1357)
eframe will now always use egui_glow as a native backend.

Part of https://github.com/emilk/egui/issues/1198
2022-03-11 19:14:27 +01:00
Emil Ernerfeldt
d8300037ad
Fix cargo run -p egui_demo_app (#1343)
Broken by https://github.com/emilk/egui/pull/1303
2022-03-08 08:26:43 +01:00
Emil Ernerfeldt
a05520b9d3 Release 0.17.0 - Improved font selection and image handling 2022-02-22 19:32:30 +01:00
Emil Ernerfeldt
c5a9421dbd
Run wasm-bindgen in CI and update parking_lot (#1293)
* Run wasm-bindgen in CI
* Update parking_lot 0.11 -> 0.12
2022-02-22 16:30:42 +01:00
Emil Ernerfeldt
c3fc8997d6
Introduce egui_extras with RetainedImage for loading svg,png,jpeg,… (#1282) 2022-02-21 15:26:26 +01:00
Emil Ernerfeldt
89d19860b8 Misc code cleanup, docs fixes, etc 2022-02-19 20:58:28 +01:00
Emil Ernerfeldt
712d8c9a2b
Run cargo deny in CI (#1205)
* Run cargo deny in CI
* Use patched fork of ureq to avoid copy-left license
* Use patched fork of tts to avoid LGPL license

More:
* https://github.com/ndarilek/tts-rs/pull/21
* https://github.com/algesten/ureq/pull/479
2022-02-04 22:08:15 +01:00
Emil Ernerfeldt
b5aaa5fa6f Improve some feature flags 2022-01-31 19:24:56 +01:00
Emil Ernerfeldt
199bbef77b Add misc documentation 2022-01-22 09:07:41 +01:00
Emil Ernerfeldt
9df0c68a38 Small improvements to check.sh 2022-01-17 19:57:32 +01:00
Emil Ernerfeldt
b1fd6a44e8
Switch to using glow as the default renderer both on native and the web (#1020)
* Switch to using glow as the default renderer both on native and the web
* Simplify code to find WebGL context for glow
* egui_web: make webgl an opt-in feature
* Stop using deprecated WEBGL_debug_renderer_info
2021-12-31 15:17:55 +01:00
Emil Ernerfeldt
0146c7e7fc Release 0.16.0 - Context menus and rich text 2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
d0a47bf8e8 setup_web.sh: don't force-install wasm-bindgen-cli 2021-12-28 21:30:36 +01:00
Emil Ernerfeldt
da09a5c69c Fix compilation with "serialize" feature without "persistence" feature 2021-10-23 15:12:39 +02:00
Emil Ernerfeldt
39c6c7e5c9 Small code cleanup 2021-10-23 06:03:45 +02:00
Emil Ernerfeldt
2a9037cd90 Clean up epaint mutex code 2021-10-20 22:24:34 +02:00
Emil Ernerfeldt
8178d23d19
Deduplicate code found in both egui_glium and egui_glow (#819)
* Move window building to egui-winit

* Move icon loading to egui-winit

* `use glow::HasContext;` -> `use glow::HasContext as _;`

* Move FileStorage into epi behind a feature flag

* De-duplicate screen_size_in_pixels and native_pixels_per_point

* Move creation of FileStorage to epi

* Handle epi app output (window size changes etc) in egui-winit

* Move app and memory persistence and autosave logic to egui-winit

* fix check.sh

* Make the epi backend opt-in for egui_glium and egui_glow

* Fix persistence

* Add integration name to epi::IntegrationInfo and the demo

* Clean up Cargo.toml files and fix making egui_glium optional

* fix typo

* Make egui_glium compile without the `epi` feature
2021-10-19 21:40:55 +02:00
Emil Ernerfeldt
cdd4dccf5f
Add egui_glow as an opt-in backend to eframe (#817)
* Make egui_glow and opt-in backend for eframe

* Add egui_glow to Cargo.toml and to CI

* Reference egui_glow where egui_glium is mentioned

* Remove path-patches from root Cargo.toml

* Add instructions on how to enable the glow backend of eframe
2021-10-19 15:32:23 +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
241667b078 Reduce monomorphization, reducing wasm size by around 3% 2021-09-07 21:33:10 +02:00
Emil Ernerfeldt
0e457c4b06 build_demo_web.sh: add --fast flag to skip optimization step 2021-08-21 21:33:51 +02:00
Emil Ernerfeldt
b1559963bf Enable a bunch more clippy lints 2021-05-09 14:13:09 +02:00
Emil Ernerfeldt
6ad6f56cb1 Move shell scripts into sh/ subfolder 2021-05-09 13:28:24 +02:00