pub trait GLContexts<GL: GLTypes> {
// Required methods
fn device(&self, context_id: ContextId) -> Option<GL::Device>;
fn device_for_painter(
&mut self,
painter_id: PainterId,
) -> Option<GL::Device>;
fn bindings(&mut self, context_id: ContextId) -> Option<&GL::Bindings>;
fn context(&mut self, context_id: ContextId) -> Option<&mut GL::Context>;
}Required Methods§
fn device(&self, context_id: ContextId) -> Option<GL::Device>
Sourcefn device_for_painter(&mut self, painter_id: PainterId) -> Option<GL::Device>
fn device_for_painter(&mut self, painter_id: PainterId) -> Option<GL::Device>
An XRSession can technically be requested before a WebGL context exists, so initial acquisition of the SurfmanDevice needs to be done by PainterId.
fn bindings(&mut self, context_id: ContextId) -> Option<&GL::Bindings>
fn context(&mut self, context_id: ContextId) -> Option<&mut GL::Context>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".