pub struct Texture2D { /* private fields */ }Implementations§
Source§impl Texture2D
impl Texture2D
pub fn new(context: Rc<Context>) -> Self
pub fn set_usage(&mut self, usage_flags: TextureUsages)
pub fn get_native_format(&self) -> Option<TextureFormat>
pub fn get_texture(&self) -> Option<&Texture>
pub fn get_texture_view(&self) -> Option<&TextureView>
pub fn get_sampler(&self) -> Option<&Sampler>
pub fn get_sampler_state(&self) -> &SamplerState
Trait Implementations§
Source§impl Texture2D for Texture2D
impl Texture2D for Texture2D
fn set_sampler_configuration(&mut self, sampler_state: SamplerState)
fn set_format( &mut self, pixel_format: TexturePixelType, channel_type: TextureChannelDataType, )
fn set_size(&mut self, size: Size)
fn set_image(&mut self, image: Option<Rc<PremultipliedImage>>)
fn get_format(&self) -> TexturePixelType
fn get_size(&self) -> Size
fn get_data_size(&self) -> usize
fn get_pixel_stride(&self) -> usize
fn num_channels(&self) -> usize
fn create(&mut self)
fn upload_data(&mut self, pixel_data: Option<&[u8]>, size: Size)
fn upload_sub_region( &mut self, pixel_data: Option<&[u8]>, region_size: Size, x_offset: u16, y_offset: u16, )
fn needs_upload(&self) -> bool
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Auto Trait Implementations§
impl !RefUnwindSafe for Texture2D
impl !Send for Texture2D
impl !Sync for Texture2D
impl !UnwindSafe for Texture2D
impl Forget for Texture2D
impl Freeze for Texture2D
impl Move for Texture2D
impl Unpin for Texture2D
impl UnsafeUnpin for Texture2D
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