pub struct FemtoVGRenderer { /* private fields */ }
Expand description
Use the FemtoVG renderer when implementing a custom Slint platform where you deliver events to Slint and want the scene to be rendered using OpenGL. The rendering is done using the FemtoVG library.
Implementations§
Source§impl FemtoVGRenderer
impl FemtoVGRenderer
Sourcepub fn new(
opengl_context: impl OpenGLInterface + 'static,
) -> Result<Self, PlatformError>
pub fn new( opengl_context: impl OpenGLInterface + 'static, ) -> Result<Self, PlatformError>
Creates a new renderer that renders using OpenGL. An implementation of the OpenGLInterface trait needs to supplied.
Sourcepub fn render(&self) -> Result<(), PlatformError>
pub fn render(&self) -> Result<(), PlatformError>
Render the scene using OpenGL.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FemtoVGRenderer
impl !RefUnwindSafe for FemtoVGRenderer
impl !Send for FemtoVGRenderer
impl !Sync for FemtoVGRenderer
impl Unpin for FemtoVGRenderer
impl !UnwindSafe for FemtoVGRenderer
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