mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Change Arc<glow::Context> to Rc<glow::Context> (#3598)
This is required for Rust 1.72 (for unknown reasons; see https://github.com/emilk/egui/pull/3595), but also for updating to glow 0.13, where the `glow::Context` is not longer `Sync+Send`
This commit is contained in:
@@ -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::sync::Arc<glow::Context>>,
|
||||
pub gl: Option<std::rc::Rc<glow::Context>>,
|
||||
|
||||
/// The underlying WGPU render state.
|
||||
///
|
||||
@@ -602,7 +602,7 @@ pub struct Frame {
|
||||
|
||||
/// A reference to the underlying [`glow`] (OpenGL) context.
|
||||
#[cfg(feature = "glow")]
|
||||
pub(crate) gl: Option<std::sync::Arc<glow::Context>>,
|
||||
pub(crate) gl: Option<std::rc::Rc<glow::Context>>,
|
||||
|
||||
/// Can be used to manage GPU resources for custom rendering with WGPU using [`egui::PaintCallback`]s.
|
||||
#[cfg(feature = "wgpu")]
|
||||
@@ -674,7 +674,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::sync::Arc<glow::Context>> {
|
||||
pub fn gl(&self) -> Option<&std::rc::Rc<glow::Context>> {
|
||||
self.gl.as_ref()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user