pub struct FerroNativeGlPlatformGraphics { /* private fields */ }Expand description
The OpenGL platform graphics of the macOS backend: one context shared by every top-level and both threads that render.
Implementations§
Source§impl FerroNativeGlPlatformGraphics
impl FerroNativeGlPlatformGraphics
Sourcepub fn new(
display: ComPtr<IFrnGlDisplay>,
factory: &ComPtr<IFerroNativeFactory>,
) -> Result<FerroNativeGlPlatformGraphics, OpenGlException>
pub fn new( display: ComPtr<IFrnGlDisplay>, factory: &ComPtr<IFerroNativeFactory>, ) -> Result<FerroNativeGlPlatformGraphics, OpenGlException>
Creates a context to find out the version of OpenGL the system gives, the entry points and the format of the default framebuffer, then the shared context.
Fails, as the original throws, when the native display cannot create a context or make it current, and when the factory has no memory management helper.
Whether contexts may share their objects: always.
Sourcepub fn can_create_contexts(&self) -> bool
pub fn can_create_contexts(&self) -> bool
Whether the graphics create contexts: always.
Sourcepub fn gl_display(&self) -> &Rc<GlDisplay>
pub fn gl_display(&self) -> &Rc<GlDisplay>
The display the contexts belong to.
The context every top-level renders with.
Trait Implementations§
Source§impl IPlatformGraphics for FerroNativeGlPlatformGraphics
impl IPlatformGraphics for FerroNativeGlPlatformGraphics
Source§fn create_context(&self) -> Rc<dyn IPlatformGraphicsContext>
fn create_context(&self) -> Rc<dyn IPlatformGraphicsContext>
A new context of the display, which shares nothing with the shared context, as in the original.
§Panics
Panics when the native display cannot create a context.
Whether the backend renders through one context shared by all
surfaces.
The shared graphics context; only valid when
uses_shared_context is true.Source§fn as_feature_provider(&self) -> Option<&dyn IOptionalFeatureProvider>
fn as_feature_provider(&self) -> Option<&dyn IOptionalFeatureProvider>
Optional features of the graphics API, if the implementation provides
any.
impl Send for FerroNativeGlPlatformGraphics
impl Sync for FerroNativeGlPlatformGraphics
Auto Trait Implementations§
impl !RefUnwindSafe for FerroNativeGlPlatformGraphics
impl !UnwindSafe for FerroNativeGlPlatformGraphics
impl Freeze for FerroNativeGlPlatformGraphics
impl Unpin for FerroNativeGlPlatformGraphics
impl UnsafeUnpin for FerroNativeGlPlatformGraphics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more