pub struct RendererBackend {
pub base: RendererBackendBase,
/* private fields */
}Expand description
webgpu::RendererBackend: embedded by the platform backends, which
implement gfx::RendererBackend by delegating to it.
Fields§
§base: RendererBackendBaseImplementations§
Source§impl RendererBackend
impl RendererBackend
pub fn new(context_mode: ContextMode) -> Self
pub fn backend_impl(&self) -> &Rc<BackendImpl>
Sourcepub fn create_context(&self) -> Rc<Context>
pub fn create_context(&self) -> Rc<Context>
createContext()
pub fn deactivate(&self)
Sourcepub fn init_shaders(
&self,
registry: &ShaderRegistry,
program_parameters: &ProgramParameters,
)
pub fn init_shaders( &self, registry: &ShaderRegistry, program_parameters: &ProgramParameters, )
initShaders: register one webgpu::ShaderGroup per built-in shader.
C++ registers all 31 types; a type whose WGSL is not part of this
build is skipped (TODO(port): all sources once the
@maplibre//:webgpu-shader-headers filegroup feeds the extractor).
A duplicate registration is an error, as in C++ (which throws).
pub fn set_instance(&self, instance: Option<Instance>)
pub fn set_device(&self, device: Option<Device>)
pub fn set_queue(&self, queue: Option<Queue>)
pub fn get_instance(&self) -> Option<Instance>
pub fn get_device(&self) -> Option<Device>
pub fn get_queue(&self) -> Option<Queue>
pub fn set_depth_stencil_format(&self, format: Option<TextureFormat>)
pub fn get_depth_stencil_format(&self) -> Option<TextureFormat>
pub fn set_color_format(&self, format: Option<TextureFormat>)
pub fn get_color_format(&self) -> Option<TextureFormat>
Trait Implementations§
Source§impl Drop for RendererBackend
impl Drop for RendererBackend
Auto Trait Implementations§
impl !Freeze for RendererBackend
impl !RefUnwindSafe for RendererBackend
impl !Send for RendererBackend
impl !Sync for RendererBackend
impl !UnwindSafe for RendererBackend
impl Forget for RendererBackend
impl Unpin for RendererBackend
impl UnsafeUnpin for RendererBackend
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