Struct comfy_wgpu::Texture
source · pub struct Texture {
pub texture: Texture,
pub view: TextureView,
pub sampler: Sampler,
}Fields§
§texture: Texture§view: TextureView§sampler: SamplerImplementations§
source§impl Texture
impl Texture
pub const DEPTH_FORMAT: TextureFormat = wgpu::TextureFormat::Depth32Float
pub fn handle(&self) -> TextureHandle
pub fn create_depth_texture( device: &Device, config: &SurfaceConfiguration, label: &str ) -> Self
pub fn create_scaled_surface_texture( device: &Device, config: &SurfaceConfiguration, render_scale: f32, label: &str ) -> Self
pub fn create_scaled_mip_surface_texture( device: &Device, config: &SurfaceConfiguration, format: TextureFormat, render_scale: f32, mip_level_count: u32, label: &str ) -> Self
pub fn create_scaled_mip_filter_surface_texture( device: &Device, config: &SurfaceConfiguration, format: TextureFormat, render_scale: f32, mip_level_count: u32, filter_mode: FilterMode, label: &str ) -> Self
pub fn from_bytes( device: &Device, queue: &Queue, bytes: &[u8], label: &str, is_normal_map: bool ) -> Result<(DynamicImage, Self)>
pub fn from_image( device: &Device, queue: &Queue, img: &DynamicImage, label: Option<&str>, is_normal_map: bool ) -> Result<Self>
pub fn from_image_ex( device: &Device, queue: &Queue, img: &DynamicImage, label: Option<&str>, is_normal_map: bool, address_mode: AddressMode ) -> Result<Self>
pub fn from_image_uninit( device: &Device, img: &DynamicImage, label: Option<&str> ) -> Result<Self>
pub fn create_uninit( device: &Device, width: u32, height: u32, label: Option<&str> ) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl !UnwindSafe for Texture
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