pub struct NullBackend { /* private fields */ }Expand description
Headless-Backend fuer Tests, CI und Pi-Betrieb ohne Display: zaehlt nur mit, was gerendert wuerde.
Implementations§
Source§impl NullBackend
impl NullBackend
pub fn rendered_frames(&self) -> u64
pub fn drawn_batches(&self) -> u64
Trait Implementations§
Source§impl Debug for NullBackend
impl Debug for NullBackend
Source§impl Default for NullBackend
impl Default for NullBackend
Source§fn default() -> NullBackend
fn default() -> NullBackend
Returns the “default value” for a type. Read more
Source§impl GfxBackend for NullBackend
impl GfxBackend for NullBackend
Source§fn init(&mut self) -> Result<(), GfxError>
fn init(&mut self) -> Result<(), GfxError>
Geraet/Pipelines anlegen; muss vor dem ersten
render laufen.Source§fn render(
&mut self,
_camera: &Camera,
batches: &[DrawBatch<'_>],
) -> Result<(), GfxError>
fn render( &mut self, _camera: &Camera, batches: &[DrawBatch<'_>], ) -> Result<(), GfxError>
Eine Szene rendern.
batches ist sortiert (opaque zuerst).Source§fn upload_texture(
&mut self,
_id: u64,
_rgba: &[u8],
_width: u32,
_height: u32,
) -> Result<(), GfxError>
fn upload_texture( &mut self, _id: u64, _rgba: &[u8], _width: u32, _height: u32, ) -> Result<(), GfxError>
Sheet-Textur (RGBA8, dicht, 4 Byte/Pixel) unter
id hochladen,
damit Batches mit sprite.texture == id sie sampeln koennen.
Backends ohne GPU duellen den No-op.Source§fn upload_cell(&mut self, _id: u64, _mesh: &Mesh) -> Result<(), GfxError>
fn upload_cell(&mut self, _id: u64, _mesh: &Mesh) -> Result<(), GfxError>
Stream-Zelle in die GPU-Residenz uebernehmen (M3c-Handoff):
ab jetzt zeichnen Batches mit
cell == Some(id). Der Aufruf
kommt aus der Upload-Pipeline, nie aus dem Update-Thread.
Backends ohne GPU-Residenz (Null) liefern den No-op und
zeichnen Zell-Batches einfach mit.Source§fn release_cell(&mut self, _id: u64)
fn release_cell(&mut self, _id: u64)
GPU-Ressourcen einer Zelle freigeben. Kommt fruehestens
nachdem der Handoff die Schonfrist ablaufen liess — niemals
waehrend ein laufender Frame die Zelle noch zeichnet.
Auto Trait Implementations§
impl Freeze for NullBackend
impl RefUnwindSafe for NullBackend
impl Send for NullBackend
impl Sync for NullBackend
impl Unpin for NullBackend
impl UnsafeUnpin for NullBackend
impl UnwindSafe for NullBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more