pub trait RenderControls {
// Required methods
fn set_quality_controls(
&self,
max_filter_samples: u32,
motion_blur_subframes: u32,
);
fn set_texture_budget_bytes(&self, budget_bytes: u64);
fn content_epoch(&self) -> u64;
fn record_frame_outcome(&self, presented: bool, repeated: bool);
fn graph_cache_key(
&self,
graph: &RenderGraph<'_>,
) -> Result<RenderCacheKey, GraphError>;
}Expand description
The controls a frame runner sets and reads on whichever renderer draws its frames: quality, the memory budget, and what has changed since.
Required Methods§
Sourcefn set_quality_controls(
&self,
max_filter_samples: u32,
motion_blur_subframes: u32,
)
fn set_quality_controls( &self, max_filter_samples: u32, motion_blur_subframes: u32, )
Sets the filter sample budget and the motion blur subframe count passes take; the renderer may cap the budget lower.
Sourcefn set_texture_budget_bytes(&self, budget_bytes: u64)
fn set_texture_budget_bytes(&self, budget_bytes: u64)
Sets the bytes of pooled pictures the renderer keeps for reuse.
Sourcefn content_epoch(&self) -> u64
fn content_epoch(&self) -> u64
A count that changes whenever results drawn earlier may no longer be what the same graph draws now.
Sourcefn record_frame_outcome(&self, presented: bool, repeated: bool)
fn record_frame_outcome(&self, presented: bool, repeated: bool)
Records whether a frame was presented, and whether it repeated the one before.
Sourcefn graph_cache_key(
&self,
graph: &RenderGraph<'_>,
) -> Result<RenderCacheKey, GraphError>
fn graph_cache_key( &self, graph: &RenderGraph<'_>, ) -> Result<RenderCacheKey, GraphError>
A deterministic key for what graph draws on this renderer.
§Errors
Returns crate::GraphError::MissingOutput when no output was selected.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".