Skip to main content

RaylibTextureModeExt

Trait RaylibTextureModeExt 

Source
pub trait RaylibTextureModeExt: Sized {
    // Provided methods
    fn begin_texture_mode<'a>(
        &'a mut self,
        _: &RaylibThread,
        framebuffer: &'a mut RenderTexture,
    ) -> RaylibTextureMode<'a, Self> { ... }
    fn draw_texture_mode<'a>(
        &'a mut self,
        _: &RaylibThread,
        framebuffer: &'a mut RenderTexture,
        func: impl FnMut(RaylibTextureMode<'_, Self>),
    ) { ... }
}

Provided Methods§

Source

fn begin_texture_mode<'a>( &'a mut self, _: &RaylibThread, framebuffer: &'a mut RenderTexture, ) -> RaylibTextureMode<'a, Self>

Begin drawing to render texture. Prefer using the closure version, RaylibTextureModeExt::draw_texture_mode . This version returns a handle that calls raylib_sys::EndTextureMode at the end of the scope and is provided as a fallback incase you run into issues with closures(such as lifetime or performance reasons)

Source

fn draw_texture_mode<'a>( &'a mut self, _: &RaylibThread, framebuffer: &'a mut RenderTexture, func: impl FnMut(RaylibTextureMode<'_, Self>), )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§