pub trait RenderableResource {
// Required method
fn as_any(&self) -> &dyn Any;
// Provided methods
fn bind(&self) { ... }
fn swap(&self) { ... }
fn get_color_texture_view(&self) -> Option<TextureView> { ... }
fn get_color_texture_format(&self) -> Option<TextureFormat> { ... }
fn get_depth_stencil_texture_view(&self) -> Option<TextureView> { ... }
fn get_depth_stencil_texture_format(&self) -> Option<TextureFormat> { ... }
}Required Methods§
Provided Methods§
Sourcefn swap(&self)
fn swap(&self)
Renderable resources that require a swap function to be called explicitly can override this method.
Sourcefn get_color_texture_view(&self) -> Option<TextureView>
fn get_color_texture_view(&self) -> Option<TextureView>
The color attachment view for render passes targeting this resource,
or None if the backend supplies it (swapchain).
fn get_color_texture_format(&self) -> Option<TextureFormat>
Sourcefn get_depth_stencil_texture_view(&self) -> Option<TextureView>
fn get_depth_stencil_texture_view(&self) -> Option<TextureView>
The depth/stencil view, if the resource manages one.
fn get_depth_stencil_texture_format(&self) -> Option<TextureFormat>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".