pub struct RenderContext { /* private fields */ }
Expand description
Generic Rendering API setup to use the current platforms primary Rendering Backend
Implementations§
Source§impl RenderContext
impl RenderContext
Sourcepub fn attach_pipeline(&mut self, pipeline: RenderPipeline) -> ResourceId
pub fn attach_pipeline(&mut self, pipeline: RenderPipeline) -> ResourceId
Permanently transfer a render pipeline to the render context in exchange for a resource ID that you can use in render commands.
Sourcepub fn attach_render_pass(&mut self, render_pass: RenderPass) -> ResourceId
pub fn attach_render_pass(&mut self, render_pass: RenderPass) -> ResourceId
Permanently transfer a render pipeline to the render context in exchange for a resource ID that you can use in render commands.
pub fn allocate_and_get_frame_buffer( &mut self, render_pass: &RenderPass<Backend>, ) -> Rc<Framebuffer<Backend>>
Sourcepub fn render(&mut self, commands: Vec<RenderCommand>)
pub fn render(&mut self, commands: Vec<RenderCommand>)
Allocates a command buffer and records commands to the GPU. This is the primary entry point for submitting commands to the GPU and where rendering will occur.
pub fn resize(&mut self, width: u32, height: u32)
Sourcepub fn get_render_pass(&self, id: ResourceId) -> &RenderPass
pub fn get_render_pass(&self, id: ResourceId) -> &RenderPass
Get the render pass with the resource ID that was provided upon attachment.
Sourcepub fn get_render_pipeline(&mut self, id: ResourceId) -> &RenderPipeline
pub fn get_render_pipeline(&mut self, id: ResourceId) -> &RenderPipeline
Get the render pipeline with the resource ID that was provided upon attachment.
Auto Trait Implementations§
impl !Freeze for RenderContext
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