pub fn new(renderer: &WGPURenderer<Device>, dimensions: Vector2<u32>) -> Result<Self> {
        let texture = renderer.wgpu_device().with_device_info(|info| {
            Ok(WGPUTexture::new(
                info.device,
                FilterMode::Linear,
                FilterMode::Linear,
                TextureType::RenderTarget,
                dimensions,
            )?)
        })?;

        let sprite = WGPUSprite::from_texture(renderer, &texture)?;

        Ok(Self {
            renderer: renderer.clone_handle(),

            texture,
            sprite,
        })
    }
/// Create a new render target with the specified dimensions
Create a new render target with the specified dimensions
Create a new render target with the specified dimensions
pub fn new(renderer: &WGPURenderer<Device>, dimensions: Vector2<u32>) -> Result<Self> {
        let texture = renderer.wgpu_device().with_device_info(|info| {
            Ok(WGPUTexture::new(
                info.device,
                FilterMode::Linear,
                FilterMode::Linear,
                TextureType::RenderTarget,
                dimensions,
            )?)
        })?;
        let sprite = WGPUSprite::from_texture(renderer, &texture)?;
        Ok(Self {
            renderer: renderer.clone_handle(),
            texture,
            sprite,
        })
    }
pub fn new ( renderer : & WGPURenderer < Device > , dimensions : Vector2 < u32 > ) -> Result < Self > { let texture = renderer . wgpu_device ( ) . with_device_info ( | info | { Ok ( WGPUTexture :: new ( info . device , FilterMode :: Linear , FilterMode :: Linear , TextureType :: RenderTarget , dimensions , ) ? ) } ) ? ; let sprite = WGPUSprite :: from_texture ( renderer , & texture ) ? ; Ok ( Self { renderer : renderer . clone_handle ( ) , texture , sprite , } ) }
Create a new render target with the specified dimensions
Create a new render target with the specified dimensions
renderer
&WGPURenderer<Device>
dimensions
Vector2<u32>
renderer
&WGPURenderer<Device>
dimensions
Vector2<u32>