* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
* Re-add check of WEBGL_debug_renderer_info to avoid OpenGL error
I removed this check in https://github.com/emilk/egui/pull/1020
because it produced a warning on Firefox. Better a warning
than an OpenGL error though.
* Bug fix: don't ask for webgl context and then later for webgl2 context
The browser will only allow the first thing we check, so this will
prevent webgl2 from working.
* Move all interior mutability from Context to CtxRef and make it a handle
* Rename `CtxRef` to `Context`
* The old `Context` is now `ContextImpl` and is non-pub
* Add benchmark Painter::rect
Co-authored-by: Daniel Keller <dklr433@gmail.com>
* Split `Event::Text` into `Text` and `Paste`
* Added explicit Event::Paste change
See #1043
* Link to PR in changelog (not the issue)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* 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>
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`
* Change version requirement for instant to be compatible to winit
* Enable wasm-bindgen feature for instant
* Update lockfile
* Update changelog
* sort dependencies
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* 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
* add spinner widget
* implement requested changes to spinner
- removed enabled field
- cleaned up math
- improved docs
* improve spinner docs & make spinner in demo always active
`begin_frame`, `end_frame` is more convenient when using egui in a game engine. In particular, 0.16.0 was incompatible with https://github.com/mvlabat/bevy_egui>.