pub struct Renderer {
pub(crate) width: u32,
pub(crate) height: u32,
pub(crate) resolution_info: ResolutionInfo,
pub(crate) pipelines: PipelinesPool,
pub(crate) packets: RenderPackets,
pub(crate) render_graph: GlobalRenderGraph,
pub(crate) merged_buffer: Option<VItemsBuffer>,
pub(crate) merged_mesh_buffer: Option<MeshItemsBuffer>,
pub(crate) profiler: GpuProfiler,
}Fields§
§width: u32§height: u32§resolution_info: ResolutionInfo§pipelines: PipelinesPool§packets: RenderPackets§render_graph: GlobalRenderGraph§merged_buffer: Option<VItemsBuffer>Present when using the merged rendering path (lazily initialized on first use).
merged_mesh_buffer: Option<MeshItemsBuffer>Present when using the merged mesh rendering path (lazily initialized on first use).
profiler: GpuProfilerAvailable on crate feature
profiling only.Implementations§
Source§impl Renderer
impl Renderer
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn ratio(&self) -> f32
pub(crate) fn build_render_graph() -> GlobalRenderGraph
pub fn new( ctx: &WgpuContext, width: u32, height: u32, oit_layers: usize, ) -> Self
pub fn new_with_graph( ctx: &WgpuContext, width: u32, height: u32, oit_layers: usize, render_graph: GlobalRenderGraph, ) -> Self
pub fn new_render_textures(&self, ctx: &WgpuContext) -> RenderTextures
Sourcepub fn render_store_with_pool(
&mut self,
ctx: &WgpuContext,
render_textures: &mut RenderTextures,
clear_color: Color,
store: &CoreItemStore,
pool: &mut RenderPool,
)
pub fn render_store_with_pool( &mut self, ctx: &WgpuContext, render_textures: &mut RenderTextures, clear_color: Color, store: &CoreItemStore, pool: &mut RenderPool, )
Render a frame. Pushes viewport + VItem packets via pool, then execs the render graph.
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more