Trait Texture

Source
pub trait Texture: Debug {
    // Required methods
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn format(&self) -> Option<Fourcc>;

    // Provided method
    fn size(&self) -> Size<i32, BufferCoord> { ... }
}
Expand description

A two dimensional texture

Required Methods§

Source

fn width(&self) -> u32

Width of the texture plane

Source

fn height(&self) -> u32

Height of the texture plane

Source

fn format(&self) -> Option<Fourcc>

Format of the texture, if available.

In case the format is hidden by the implementation, it should be assumed, that the pixel representation cannot be read.

Thus ExportMem::copy_texture, if implemented, will not succeed for this texture. Note that this does not mean every texture with a format is guaranteed to be copyable.

Provided Methods§

Source

fn size(&self) -> Size<i32, BufferCoord>

Size of the texture plane

Implementors§

Source§

impl Texture for GlesMapping

Available on crate feature renderer_gl only.
Source§

impl Texture for GlesTarget<'_>

Available on crate feature renderer_gl only.
Source§

impl Texture for GlesTexture

Available on crate feature renderer_gl only.
Source§

impl Texture for MultiTexture

Available on crate feature renderer_multi only.
Source§

impl Texture for PixmanMapping

Available on crate feature renderer_pixman only.
Source§

impl Texture for PixmanTarget<'_>

Available on crate feature renderer_pixman only.
Source§

impl Texture for PixmanTexture

Available on crate feature renderer_pixman only.
Source§

impl Texture for DummyFramebuffer

Available on crate feature renderer_test only.
Source§

impl Texture for DummyTexture

Available on crate feature renderer_test only.
Source§

impl<A: GraphicsApi, B: GraphicsApi> Texture for MultiTextureMapping<A, B>

Available on crate feature renderer_multi only.
Source§

impl<R: GraphicsApi, T: GraphicsApi> Texture for MultiFramebuffer<'_, R, T>

Available on crate feature renderer_multi only.