Justin Jaffray
4fe5fa6c59
egui_glow: Add function to set the texture filter ( #1041 )
...
* Allow setting the scale filter for `glow` backend
This commit adds a `set_scale_filter` method to the `glow` painter so that
textures can be set to scale using nearest-neighbour scaling rather than
linear. This is useful for pixel art.
I wasn't entirely sure what kind of API you want for this kind of change so I
went with what seemed least intrusive, I don't mind doing something more
holistic if this isn't what you had in mind.
* Rename scale_filter -> texture_filter
* Store the TextureFilter directly
* PR link in changelog
* Use inter-doc links
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-06 17:09:53 +01:00
Emil Ernerfeldt
753d709d3d
Hide console on windows for all examples in release builds ( #1008 )
2021-12-30 22:43:53 +01:00
Emil Ernerfeldt
0146c7e7fc
Release 0.16.0 - Context menus and rich text
2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
190c85a40f
Rename Texture
to FontImage
2021-12-28 21:19:24 +01:00
Emil Ernerfeldt
5b9a349c26
Clean up glow painter destroy code
2021-12-28 14:24:59 +01:00
Emil Ernerfeldt
cda4c8ba13
Minor cleanup following https://github.com/emilk/egui/pull/999
2021-12-28 13:22:01 +01:00
Emil Ernerfeldt
b7441eeee7
Make epi::Frame cloneable so you can allocate textures in other threads ( #999 )
...
Closes https://github.com/emilk/egui/issues/673
Also adds `epi::Image`
2021-12-26 21:21:28 +01:00
Emil Ernerfeldt
d5efa4bbca
1.56 fix: missing_crate_level_docs -> rusdoc::missing_crate_level_docs
2021-12-26 09:56:14 +01:00
Emil Ernerfeldt
c60d17b91b
Set MSRV to 1.56.0 and use rust edition 2021 ( #998 )
2021-12-25 19:32:25 +01:00
Jay Oster
dd99f68e82
Update winit to 0.26 ( #930 )
...
Also update glium, glutin and rfd
2021-12-20 22:44:53 +01:00
Henrique Penteado Kujawski Périgo
6b5c4b9aec
Disable glow scissor test after painting ( #905 )
2021-11-27 11:44:23 +01:00
Emil Ernerfeldt
89700dfbbb
Improve egui_glow debug prints
2021-11-13 13:14:10 +01:00
Emil Ernerfeldt
105cb57050
Clean up glsl code
2021-11-13 13:09:08 +01:00
Emil Ernerfeldt
b5cb2b2c0d
Some code cleanup following https://github.com/emilk/egui/pull/888
2021-11-13 12:55:48 +01:00
triangle drawer
008a971e73
Fix wrong gamma in WebkitGTK ( #888 )
...
Closes https://github.com/emilk/egui/issues/794
Also refactor and improve VAO support detection
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-11-13 12:32:01 +01:00
Emil Ernerfeldt
ddd5f6f4f6
winit: don't explicitly handle Cmd-Q and Alt-F4 ( #881 )
...
Closes https://github.com/emilk/egui/issues/877
Still a problem: https://github.com/rust-windowing/winit/issues/1998
2021-11-07 20:58:02 +01:00
Emil Ernerfeldt
49e43885ff
Replace Context::begin_frame/end_frame
with fn run
taking a closure ( #872 )
...
* Replace Context begin_frame/end_frame with `fn run` taking a closure
* Create `egui::__run_test_ui` to replace `Ui::__test`
* Add helper `egui::__run_test_ctx` for doctests
2021-11-03 20:11:25 +01:00
Emil Ernerfeldt
c71090473b
glow-vs-web cleanup following https://github.com/emilk/egui/pull/868
2021-11-03 19:35:20 +01:00
triangle drawer
804722a1ba
Make egui_glow painter to work on web ( #868 )
...
Add WebGL1 and WebGL2 support to glow painter.
Add "glow" feature to egui_web to use the glow painter there.
Make winit an optional part of egui_glow
2021-11-03 19:17:07 +01:00
Emil Ernerfeldt
1dbe608e73
Refactor integrations ( #871 )
...
* Unify code in egui_glium and egui_glow into egui_winit::EpiIntegration
* Simplify `EguiGlium` interface
* Simplify `EguiGlow` interface
* egui_web refactor: merge `WebBackend` into `AppRunner`
2021-11-03 13:45:51 +01:00
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
2021-10-24 16:15:07 +02:00
Caleb Smith
79d1ede496
Add Frame::set_window_title()
( #828 )
...
* Add `Frame::set_window_title()`
* Changelog and fmt for `Frame::set_window_title()`
Co-authored-by: Caleb Smith <caleb@myrvmail.com>
2021-10-23 00:03:17 +02:00
Emil Ernerfeldt
d97a369c44
End statements with semicolon (clippy::semicolon_if_nothing_returned)
2021-10-20 16:46:57 +02:00
Emil Ernerfeldt
a0cd41755e
Add more clippy lints
2021-10-20 16:30:39 +02:00
Emil Ernerfeldt
19a2a57f80
Rename and clean-up the "pure" glium and glow examples
2021-10-20 15:05:41 +02:00
Emil Ernerfeldt
8accfd9a8f
Clean up egui_glow painter code
2021-10-20 12:29:35 +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
844dd9d7a4
Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
...
chrono works both natively and on web.
Related: https://github.com/emilk/egui/issues/212
2021-10-19 15:37:20 +02:00
Emil Ernerfeldt
cf273e3519
Fix glow window resize bug
2021-10-18 23:39:33 +02:00
AlexApps99
877e89f2ec
Add egui_glow backend as alternative to egui_glium ( #685 )
2021-10-18 23:13:32 +02:00