|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
Owns a headless WebGPU device/queue pair for GPU rendering. More...
#include "donner/svg/renderer/geode/GeodeDevice.h"
Classes | |
| struct | Impl |
| PIMPL struct: owns the Dawn instance which must outlive adapter/device. More... | |
Static Public Member Functions | |
| static std::unique_ptr< GeodeDevice > | CreateHeadless () |
| Create a headless GeodeDevice. | |
Owns a headless WebGPU device/queue pair for GPU rendering.
GeodeDevice is the entry point to the Geode rendering backend. It creates a Dawn instance, selects a default adapter, and creates a device — all without any window system integration. All rendering happens into offscreen textures.
Typical usage:
auto maybeDevice = GeodeDevice::CreateHeadless();
if (!maybeDevice) {
// Dawn initialization failed — likely no GPU available.
return;
}
GeodeDevice& device = *maybeDevice;
wgpu::Texture target = device.device().CreateTexture(...);
// ... render ...
| struct donner::geode::GeodeDevice::Impl |
PIMPL struct: owns the Dawn instance which must outlive adapter/device.
| Class Members | ||
|---|---|---|
| unique_ptr< Instance > | instance | |
|
static |
Create a headless GeodeDevice.