oa::render::Texture

Packed RGBA8 texture value reusable by Render, Presenter, Image, and UI. Two backings are currently admitted: Buffer-backed: uploaded from host bytes or a Matrix; supports read_rgba8. Render-target-backed: a non-owning alias of a Renderer slot’s color image; valid only while the originating RenderFrame is live. Readback uses RenderFrame::consume_readback, not read_rgba8.

StRust public API

Declaration

pub struct Texture { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn dtype(&self) -> DType
pub fn read_rgba8(&self) -> Result<Vec<u8>>
fn clone(&self) -> Texture

Public Method Documentation

pub fn width( &self ) -> usize
No public source comment is attached to this declaration.
pub fn height( &self ) -> usize
No public source comment is attached to this declaration.
pub fn dtype( &self ) -> DType
No public source comment is attached to this declaration.
pub fn read_rgba8( &self ) -> Result<Vec<u8>>
No public source comment is attached to this declaration.
fn clone( &self ) -> Texture
No public source comment is attached to this declaration.