Offscreen

Trait Offscreen 

Source
pub trait Offscreen<Target>: Renderer + Bind<Target> {
    // Required method
    fn create_buffer(
        &mut self,
        format: Fourcc,
        size: Size<i32, BufferCoord>,
    ) -> Result<Target, Self::Error>;
}
Expand description

Trait for renderers that support creating offscreen framebuffers to render into.

Usually also implement ExportMem to receive the framebuffers contents.

Required Methods§

Source

fn create_buffer( &mut self, format: Fourcc, size: Size<i32, BufferCoord>, ) -> Result<Target, Self::Error>

Create a new instance of a framebuffer.

This call may fail, if (but not limited to):

  • The maximum amount of framebuffers for this renderer would be exceeded
  • The format is not supported to be rendered into
  • The size is too large for a framebuffer

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Offscreen<GlesRenderbuffer> for GlesRenderer

Available on crate feature renderer_gl only.
Source§

impl Offscreen<GlesTexture> for GlesRenderer

Available on crate feature renderer_gl only.
Source§

impl Offscreen<Image<'static, 'static>> for PixmanRenderer

Available on crate feature renderer_pixman only.
Source§

impl<R, T: GraphicsApi, Target> Offscreen<Target> for MultiRenderer<'_, '_, R, T>
where <T::Device as ApiDevice>::Renderer: Offscreen<Target> + Bind<Target> + ImportDma + ImportMem, <R::Device as ApiDevice>::Renderer: Offscreen<Target> + Bind<Target> + Bind<Dmabuf> + ExportMem + ImportDma + ImportMem, R: 'static + GraphicsApi, R::Error: 'static, T::Error: 'static, <<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send, <<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static, <<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,

Available on crate feature renderer_multi only.
Source§

impl<T> Offscreen<T> for GlowRenderer

Available on crate feature renderer_glow only.