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§
Sourcefn format(&self) -> Option<Fourcc>
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§
Sourcefn size(&self) -> Size<i32, BufferCoord>
fn size(&self) -> Size<i32, BufferCoord>
Size of the texture plane
Implementors§
impl Texture for GlesMapping
Available on crate feature
renderer_gl
only.impl Texture for GlesTarget<'_>
Available on crate feature
renderer_gl
only.impl Texture for GlesTexture
Available on crate feature
renderer_gl
only.impl Texture for MultiTexture
Available on crate feature
renderer_multi
only.impl Texture for PixmanMapping
Available on crate feature
renderer_pixman
only.impl Texture for PixmanTarget<'_>
Available on crate feature
renderer_pixman
only.impl Texture for PixmanTexture
Available on crate feature
renderer_pixman
only.impl Texture for DummyFramebuffer
Available on crate feature
renderer_test
only.impl Texture for DummyTexture
Available on crate feature
renderer_test
only.impl<A: GraphicsApi, B: GraphicsApi> Texture for MultiTextureMapping<A, B>
Available on crate feature
renderer_multi
only.impl<R: GraphicsApi, T: GraphicsApi> Texture for MultiFramebuffer<'_, R, T>
Available on crate feature
renderer_multi
only.