Enum RenderBackendType Copy item path Source pub enum RenderBackendType {
Canvas2D,
WebGpu,
WebGl,
}Expand description The rendering backend type used by the engine.
Selects between the Canvas 2D immediate-mode API and the WebGPU
pipeline-based API. Canvas 2D is universally supported and suitable
for 2D games and simple 3D software rendering. WebGPU provides
GPU-accelerated rendering for demanding 2D and 3D scenes.
The Canvas 2D rendering backend (CanvasRenderingContext2d).
Universal browser support, immediate-mode drawing API, suitable
for 2D games and software-rendered 3D.
The WebGPU rendering backend (GpuDevice + GpuCanvasContext).
GPU-accelerated rendering with shaders, buffers, and pipelines.
Requires a WebGPU-capable browser.
The WebGL 2 rendering backend (WebGl2RenderingContext).
GPU-accelerated rendering with GLSL ES 3.00 shaders. Supported by
every modern browser, making it the GPU fallback for browsers that
do not expose WebGPU.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Perform a zero-cost type-safe upcast to a wider ref type within the Wasm
bindgen generics type system.
Read more Perform a zero-cost type-safe upcast to a wider type within the Wasm
bindgen generics type system.
Read more