pub type RenderTexture2D = RenderTexture;
Expand description

RenderTexture2D, same as RenderTexture

Aliased Type§

struct RenderTexture2D { /* private fields */ }

Implementations§

source§

impl RenderTexture

source

pub fn width(&self) -> u32

Texture base width

source

pub fn height(&self) -> u32

Texture base height

source

pub fn new(width: u32, height: u32) -> Option<Self>

Load texture for rendering (framebuffer)

source

pub fn as_raw(&self) -> &RenderTexture

Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original

source

pub fn as_raw_mut(&mut self) -> &mut RenderTexture

Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original

source

pub unsafe fn from_raw(raw: RenderTexture) -> Self

Convert a ‘raw’ ffi object to a safe wrapper

Safety
  • The raw object must be correctly initialized
  • The raw object should be unique. Otherwise, make sure its clones don’t outlive the newly created object.

Trait Implementations§

source§

impl Debug for RenderTexture

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for RenderTexture

source§

fn drop(&mut self)

Executes the destructor for this type. Read more