Struct re_renderer::RenderContext
source · pub struct RenderContext {
pub device: Arc<Device>,
pub queue: Arc<Queue>,
pub mesh_manager: RwLock<MeshManager>,
pub texture_manager_2d: TextureManager2D,
pub active_frame: ActiveFrameContext,
pub gpu_resources: WgpuResourcePools,
/* private fields */
}Expand description
Any resource involving wgpu rendering which can be re-used across different scenes. I.e. render pipelines, resource pools, etc.
Fields§
§device: Arc<Device>§queue: Arc<Queue>§mesh_manager: RwLock<MeshManager>§texture_manager_2d: TextureManager2D§active_frame: ActiveFrameContext§gpu_resources: WgpuResourcePoolsImplementations§
source§impl RenderContext
impl RenderContext
pub fn new( adapter: &Adapter, device: Arc<Device>, queue: Arc<Queue>, config: RenderContextConfig ) -> Self
sourcepub fn begin_frame(&mut self)
pub fn begin_frame(&mut self)
Call this at the beginning of a new frame.
Updates internal book-keeping, frame allocators and executes delayed events like shader reloading.
sourcepub fn before_submit(&mut self)
pub fn before_submit(&mut self)
Call this at the end of a frame but before submitting command buffers (e.g. from crate::view_builder::ViewBuilder)
Auto Trait Implementations§
impl !RefUnwindSafe for RenderContext
impl Send for RenderContext
impl Sync for RenderContext
impl Unpin for RenderContext
impl !UnwindSafe for RenderContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more