pub fn initialize_offscreen_rendering() -> Result<impl OffscreenRenderContext, RenderInitError> {
    // Get the default metal device for the current system
    let device = metal::Device::system_default();
    let device = if let Some(device) = device { device } else { Err(RenderInitError::CannotOpenGraphicsDevice)? };

    // Result is a Metal offscreen render context
    Ok(MetalOffscreenRenderContext {
        device: device
    })
}
///
/// Performs on-startup initialisation steps for offscreen rendering
///
/// Only required if not using a toolkit renderer (eg, in an HTTP renderer or command-line tool). Will likely replace
/// the bindings for any GUI toolkit, so this is not appropriate for desktop-type apps.
///
/// This version is the Metal version for Mac OS X
///
Performs on-startup initialisation steps for offscreen rendering
Only required if not using a toolkit renderer . Will likely replace
the bindings for any GUI toolkit, so this is not appropriate for desktop-type apps.

This version is the Metal version for Mac OS X
Performs on - startup initialisation steps for offscreen rendering Only required if not using a toolkit renderer . Will likely replace the bindings for any GUI toolkit so this is not appropriate for desktop - type apps . This version is the Metal version for Mac OS X
pub fn initialize_offscreen_rendering() -> Result<impl OffscreenRenderContext, RenderInitError> {
    // Get the default metal device for the current system
    let device = metal::Device::system_default();
    let device = if let Some(device) = device { device } else { Err(RenderInitError::CannotOpenGraphicsDevice)? };
    // Result is a Metal offscreen render context
    Ok(MetalOffscreenRenderContext {
        device: device
    })
}
pub fn initialize_offscreen_rendering ( ) -> Result < impl OffscreenRenderContext , RenderInitError > { // Get the default metal device for the current system let device = metal :: Device :: system_default ( ) ; let device = if let Some ( device ) = device { device } else { Err ( RenderInitError :: CannotOpenGraphicsDevice ) ? } ; // Result is a Metal offscreen render context Ok ( MetalOffscreenRenderContext { device : device } ) }
Performs on-startup initialisation steps for offscreen rendering
Only required if not using a toolkit renderer (eg, in an HTTP renderer or command-line tool).
Performs on - startup initialisation steps for offscreen rendering Only required if not using a toolkit renderer ( eg in an HTTP renderer or command - line tool ) .