Commit Graph

28 Commits

Author SHA1 Message Date
Daniel Buch Hansen 4629f2cd12 Example: three-d downgrade depth_buffer to 24 bit (#1950)
Closes: #1949
2022-08-21 19:23:34 +02:00
Emil Ernerfeldt 127931ba45 eframe: rename quit/exit to "close" (#1943)
Since https://github.com/emilk/egui/pull/1919 we can continue
the application after closing the native window. It therefore makes
more sense to call `frame.close()` to close the native window,
instead of `frame.quit()`.
2022-08-20 16:08:59 +02:00
Emil Ernerfeldt 2453756782 Fix broken GitHub source links due to #1940 2022-08-20 15:18:02 +02:00
Emil Ernerfeldt 725aa5277b Update crate rfd to 0.10 (in file_dialog example)
Also update ab_glyph from 0.2.15 to 0.2.16
2022-08-20 14:42:37 +02:00
Emil Ernerfeldt 041f2e64ba Move all crates into a crates directory (#1940) 2022-08-20 10:41:49 +02:00
Asger Nyman Christiansen eeeb4b7de2 Improve custom_3d_three-d example (#1923)
* Use correct FBO to output

* custom_3d_three-d web

* Update .gitignore

* Do not free the FBO

* Use three-d 0.13

* ThreeDApp

* Only construct model and camera once

* Clean-up and docs

* Web build instructions

* Remove unused dependencies

* Update Cargo.lock

* Fix build

* More fixes

* omg
2022-08-17 21:33:34 +02:00
Emil Ernerfeldt 9c58f12a6c eframe: several windows in series (#1919)
* Add example of opening several eframe windows in series

* Reuse the same winit event loop

* Ignore events to the wrong window

* Run run_return again
2022-08-15 16:31:03 +02:00
Lorren Biffin e3f993d7b4 Fixed bug in custom window example (#1750) 2022-08-04 12:32:27 +02:00
Asger Nyman Christiansen 3eccd341ad Add depth buffer in native 3D example (#1878)
The `custom_3d_three-d` example does not enable a depth buffer since it is only rendering a triangle. However, if it is used as a starting point for other projects, it is highly likely that a depth buffer is actually needed, therefore I propose to enable it by default.
Also see [this](https://github.com/asny/three-d/issues/268) issue for full context.
2022-08-02 17:31:15 +02:00
Emil Ernerfeldt 2612dd1064 Add Visuals::error_fg_color and Visuals::warn_fg_color 2022-07-29 15:32:32 +02:00
Matt Campbell 7a46a23db5 Update MSRV to Rust 1.61.0 (#1846) 2022-07-26 16:50:53 +02:00
Emil Ernerfeldt bd2cab2f0e Update three d (#1793)
* Update three-d to 0.12

* Fix Z fighting in three-d example

Closes https://github.com/emilk/egui/issues/1744

* cargo deny: ignore three-d (only used in examples)
2022-07-03 18:29:12 +02:00
Emil Ernerfeldt 406703568e Minor clippy fixes (clippy::format_push_string) 2022-07-03 11:58:53 +02:00
Emil Ernerfeldt 42edb92232 Fix compilation of screenshot example (merge race) 2022-05-29 20:59:39 +02:00
René Rössler 4a7a2d6430 eframe::App::post_rendering (#1591) 2022-05-29 20:33:04 +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 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
Sebastian Urban 5687aa6b50 Request GLSL version 3.30. (#1639) 2022-05-21 12:52:20 +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 c869f67066 Simplify file_dialog example 2022-04-30 15:49:22 +02:00
Emil Ernerfeldt 8a2470b45e example hello_world: remove frame.set_window_size
it doesn't work very well
2022-04-30 15:47:55 +02:00
Emil Ernerfeldt e1bcaeebe5 App::clear_color: give egui::Visuals as argument 2022-04-30 15:41:43 +02:00
Emil Ernerfeldt f3e31391e0 Pass clip rectangle to PaintCallback 2022-04-15 10:31:33 +02:00
Stanisław Jelnicki 2745699bd6 Add Ui::spinner shortcut method (#1494) 2022-04-15 07:39:08 +02:00
tami5 b738418243 New example 'custom_font_style' + improve docs (#1476) 2022-04-14 07:54:01 +02:00
Emil Ernerfeldt 2ae93c40ab Move examples out of eframe/examples into examples/ (#1486)
* Move examples out of eframe/examples into examples/

Give each example a `Cargo.toml` and `src/main.rs`.
This makes it easier for people to use as templates.

* Update README.md with more deps needed on vanilla Ubuntu
* Install libgtk-3-dev on CI, hoping that will fix something
2022-04-13 16:13:24 +02:00
Emil Ernerfeldt 170b21b63e Add opt-in support for the 'puffin' profiler in eframe (#1483) 2022-04-13 11:06:13 +02:00