File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
lambda-rs-platform/src/wgpu Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -640,6 +640,11 @@ impl Texture {
640640 return & self . view ;
641641 }
642642
643+ /// Convenience: return a `TextureViewRef` for use in render pass attachments.
644+ pub fn view_ref ( & self ) -> crate :: wgpu:: surface:: TextureViewRef < ' _ > {
645+ return crate :: wgpu:: surface:: TextureViewRef { raw : & self . view } ;
646+ }
647+
643648 /// Optional debug label used during creation.
644649 pub fn label ( & self ) -> Option < & str > {
645650 return self . label . as_deref ( ) ;
Original file line number Diff line number Diff line change @@ -349,6 +349,13 @@ impl Texture {
349349 pub ( crate ) fn platform_texture ( & self ) -> Rc < platform:: Texture > {
350350 return self . inner . clone ( ) ;
351351 }
352+
353+ /// Borrow a texture view reference for use in render pass attachments.
354+ pub ( crate ) fn view_ref ( & self ) -> crate :: render:: surface:: TextureView < ' _ > {
355+ return crate :: render:: surface:: TextureView :: from_platform (
356+ self . inner . view_ref ( ) ,
357+ ) ;
358+ }
352359}
353360
354361#[ derive( Debug , Clone ) ]
You can’t perform that action at this time.
0 commit comments