pub fn begin_render<'a>(&'a self) -> Result<impl RenderContext + 'a> {
        let encoder = self.wgpu_device.with_device_info(|info| {
            Ok(info
                .device
                .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }))
        })?;

        let target = SwapChainFrameTarget::new(self, self.dimensions());
        BufferedRenderer::new(target, encoder)
    }
/// Get a render context for the current swap chain frame.
///
/// # Example
///
/// ```no_run
/// # use riddle::{common::Color, platform::*, renderer::*, math::*, *};
/// # fn main() -> Result<(), RiddleError> {
/// # let rdl =  RiddleLib::new()?;
/// # let window = WindowBuilder::new().build(rdl.context())?;
/// let renderer = Renderer::new_from_window(&window)?;
///
/// let mut render_ctx = renderer.begin_render()?;
/// render_ctx.clear(Color::RED);
/// render_ctx.present();
/// # Ok(()) }
/// ```
Get a render context for the current swap chain frame.
Get a render context for the current swap chain frame .
pub fn begin_render<'a>(&'a self) -> Result<impl RenderContext + 'a> {
        let encoder = self.wgpu_device.with_device_info(|info| {
            Ok(info
                .device
                .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }))
        })?;
        let target = SwapChainFrameTarget::new(self, self.dimensions());
        BufferedRenderer::new(target, encoder)
    }
pub fn begin_render < ' a > ( & ' a self ) -> Result < impl RenderContext + ' a > { let encoder = self . wgpu_device . with_device_info ( | info | { Ok ( info . device . create_command_encoder ( & wgpu :: CommandEncoderDescriptor { label : None } ) ) } ) ? ; let target = SwapChainFrameTarget :: new ( self , self . dimensions ( ) ) ; BufferedRenderer :: new ( target , encoder ) }
Get a render context for the current swap chain frame.
Get a render context for the current swap chain frame .
&'a self
&'a self
example
None
use riddle::{common::color, platform::*, renderer::*, math::*, *};
None
fn main() -> result<(), riddleerror> {
None
let rdl =  riddlelib::new()?;
None
let window = windowbuilder::new().build(rdl.context())?;
let renderer = Renderer::new_from_window(&window)?.

let mut render_ctx = renderer.begin_render()?;
render_ctx.clear(Color::RED);
render_ctx.present().
let renderer = Renderer :: new_from_window ( &window ) ? . let mut render_ctx = renderer . begin_render () ? ; render_ctx . clear ( Color :: RED ) ; render_ctx . present () .
ok(()) }
None