Struct libktx_rs::texture::Texture [−][src]
pub struct Texture<'a> { /* fields omitted */ }
Expand description
A KTX (1 or 2) texture.
This wraps both a sys::ktxTexture
handle, and the TextureSource
it was created from.
Implementations
Attempts to create a new texture, consuming the given TextureSource
.
Returns the pointer to the (C-allocated) underlying sys::ktxTexture
.
SAFETY: Pointers are harmless. Dereferencing them is not!
Returns the pitch (in bytes) of an image row at the specified image level.
This is rounded up to 1 if needed.
Returns the size (in bytes) of an element of the image.
Attempts to write the texture (in its native format, either KTX1 or KTX2) to sink
.
If this Texture
really is a KTX1, returns KTX1-specific functionalities for it.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Texture<'a>
impl<'a> !UnwindSafe for Texture<'a>