pub struct Renderer {
pub instance: <Backend as Backend>::Instance,
pub device: <Backend as Backend>::Device,
pub queue_groups: RefCell<Vec<QueueGroup<Backend>>>,
pub adapter: Adapter<Backend>,
pub allocator: RefCell<GpuAllocator<<Backend as Backend>::Memory>>,
/* private fields */
}
Fields§
§instance: <Backend as Backend>::Instance
§device: <Backend as Backend>::Device
§queue_groups: RefCell<Vec<QueueGroup<Backend>>>
§adapter: Adapter<Backend>
§allocator: RefCell<GpuAllocator<<Backend as Backend>::Memory>>
Implementations§
Source§impl Renderer
impl Renderer
pub fn new() -> Renderer
Sourcepub fn wrap(self) -> Rc<Renderer>
pub fn wrap(self) -> Rc<Renderer>
Convenience method to create an Rc<Renderer>
in a builder method chain.
See also RendererBuilder::build_rc
Sourcepub fn wait_next_frame(&self) -> usize
pub fn wait_next_frame(&self) -> usize
Waits for the next frame to finish rendering, deallocates its resources, and returns its index.
Generally, this won’t need to be called in application code, since it is done by RenderTarget
s before creating
a Frame
.
Sourcepub fn next_frame_idx(&self) -> usize
pub fn next_frame_idx(&self) -> usize
Returns the index of the next frame to be rendered, to be used when selecting the command buffer, semaphores and fences.
Trait Implementations§
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§
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