The Vivante GPU on many STM32MP1 based boards does not support sRGB
as an internal format.
Introduce a check for sRGB support and default to `RGBA8` internal format
if not supported.
Additionally the STM32MP1 needs to be checked for `GL_ARB_vertex_array_object`
Closes#1991
* Bug fix: reset repaint countdown when we pass it
* eframe: debug-print what winit event caused a repaint
* egui-winit: don't repaint when only moving window
* fix docstring
* Add `custom_parser` to `DragValue`
* Add `custom_parser` to `Slider`
* Add `binary_u64`, `octal_u64`, and `hexadecimal_u64` to `DragValue`
* Add `binary_u64`, `octal_u64`, and `hexadecimal_u64` to `Slider`
* Fix formatting and errors in docs
* Update CHANGELOG.md
* Fix CI errors
* Replace manual number parsing with i64::from_str_radix. Add support for signed integers.
* Update CHANGELOG.md
* Change documentation.
* Fix documentation.
* Fix documentation.
* Remove unnecessary links.
* 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
* egui_extras: Add Table::vertical_scroll_offset
* Added example for TableBuilder::vertical_scroll_offset
* Format code
* Add link to PR in the changelog
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Allow cursors to be linked
* Link cursors in demo
* Refactor cursor memory to deal with removal of plots
* Refactor PlotItem::on_hover to produce a list of cursors
* Use a separate `LinkedCursorsGroup` type to link cursors.
* Refactor `Cursor`.
* Inline `push_argument_ruler` and `push_value_ruler`.
* Update documentation
* Update doc reference
* eframe: allow hooking into EventLoop building
This enables native applications to add an `event_loop_builder` callback
to the `NativeOptions` struct that lets them modify the Winit
`EventLoopBuilder` before the final `EventLoop` is built and run.
This makes it practical for applications to change platform
specific config options that Egui doesn't need to be directly aware of.
For example the `android-activity` glue crate that supports writing
Android applications in Rust requires that the Winit event loop be
passed a reference to the `AndroidApp` that is given to the
`android_main` entrypoint for the application.
Since the `AndroidApp` itself is abstracted by Winit then there's no
real need for Egui/EFrame to have a dependency on the `android-activity`
crate just for the sake of associating this state with the event loop.
Addresses: #1951
* eframe: defer graphics state initialization until app Resumed
Conceptually the Winit `Resumed` event signifies that the application is
ready to run and render and since
https://github.com/rust-windowing/winit/pull/2331 all platforms now
consistently emit a Resumed event that can be used to initialize
graphics state for an application.
On Android in particular it's important to wait until the application
has Resumed before initializing graphics state since it won't have an
associated SurfaceView while paused.
Without this change then Android applications are likely to just show
a black screen.
This updates the Wgpu+Winit and Glow+Winit integration for eframe but
it's worth noting that the Glow integration is still not able to fully
support suspend and resume on Android due to limitations with Glutin's
API that mean we can't destroy and create a Window without also
destroying the GL context, and therefore (practically) the entire
application.
There is a plan (and progress on) to improve the Glutin API here:
https://github.com/rust-windowing/glutin/pull/1435 and with that change
it should be an incremental change to enable Android suspend/resume
support with Glow later.
In the mean time the Glow changes keep the implementation consistent
with the wgpu integration and it should now at least be possible to
start an Android application - even though it won't be able to suspend
correctly.
Fixes#1951
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()`.
I have gone back and forth on this a bit, but I think the arguments
AGAINST following the system theme are many:
* `dark-light` is a big dependency with problems on Linux.
* Many people prefer the dark mode and ask how to set it as the default
(even though they are using light mode in their OS).
* A developer may be surprised when the app changes theme when
they run it on another computer.
So, the path of least surprise is to make this an opt-in feature
with dark mode as the default mode.
On native, you add the `dark-light` feature to enable it.
On web, you set `WebOptions::follow_system_theme`.
* 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