1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Make glow Send + Sync again. (#3646)

* Reverts #3598
* Closes #3645
This commit is contained in:
Sebastian Urban
2023-12-04 15:58:05 +01:00
committed by GitHub
parent 84a6d6f2ab
commit 36c6b6304d
7 changed files with 14 additions and 13 deletions

View File

@@ -64,7 +64,7 @@ pub struct CreationContext<'s> {
///
/// Only available when compiling with the `glow` feature and using [`Renderer::Glow`].
#[cfg(feature = "glow")]
pub gl: Option<std::rc::Rc<glow::Context>>,
pub gl: Option<std::sync::Arc<glow::Context>>,
/// The underlying WGPU render state.
///
@@ -584,7 +584,7 @@ pub struct Frame {
/// A reference to the underlying [`glow`] (OpenGL) context.
#[cfg(feature = "glow")]
pub(crate) gl: Option<std::rc::Rc<glow::Context>>,
pub(crate) gl: Option<std::sync::Arc<glow::Context>>,
/// Can be used to manage GPU resources for custom rendering with WGPU using [`egui::PaintCallback`]s.
#[cfg(feature = "wgpu")]
@@ -656,7 +656,7 @@ impl Frame {
/// To get a [`glow`] context you need to compile with the `glow` feature flag,
/// and run eframe using [`Renderer::Glow`].
#[cfg(feature = "glow")]
pub fn gl(&self) -> Option<&std::rc::Rc<glow::Context>> {
pub fn gl(&self) -> Option<&std::sync::Arc<glow::Context>> {
self.gl.as_ref()
}