Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::geode::GeodeEmbedConfig Struct Reference

Configuration for embedding Geode into a host application that already owns a WebGPU device. More...

#include "donner/svg/renderer/geode/GeodeDevice.h"

Public Attributes

wgpu::Device device
 Host-provided WebGPU device. Must not be null.
wgpu::Queue queue
 Host-provided queue associated with device. Must not be null.
wgpu::TextureFormat textureFormat = wgpu::TextureFormat::RGBA8Unorm
 Texture format for render targets. Must match the format of any texture passed to RendererGeode::setTargetTexture().
wgpu::Adapter adapter
 Optional adapter handle. When provided, Geode uses it for hardware workaround detection (e.g., Intel Arc + Vulkan alpha-coverage fallback). When null, workaround detection is skipped — the host is assumed to know its own hardware characteristics.

Detailed Description

Configuration for embedding Geode into a host application that already owns a WebGPU device.

The host is responsible for the lifetime of the device and queue — they must remain valid for the entire lifetime of any GeodeDevice or RendererGeode constructed from this config.

Example:

config.device = myDevice;
config.queue = myQueue;
config.textureFormat = wgpu::TextureFormat::BGRA8Unorm;
auto geodeDevice = GeodeDevice::CreateFromExternal(config);
RendererGeode renderer(std::move(geodeDevice));
static std::unique_ptr< GeodeDevice > CreateFromExternal(const GeodeEmbedConfig &config)
Create a GeodeDevice wrapping a host-provided device and queue.
Configuration for embedding Geode into a host application that already owns a WebGPU device.
Definition GeodeDevice.h:43
wgpu::Device device
Host-provided WebGPU device. Must not be null.
Definition GeodeDevice.h:45
wgpu::Queue queue
Host-provided queue associated with device. Must not be null.
Definition GeodeDevice.h:48
wgpu::TextureFormat textureFormat
Texture format for render targets. Must match the format of any texture passed to RendererGeode::setT...
Definition GeodeDevice.h:52

Member Data Documentation

◆ adapter

wgpu::Adapter donner::geode::GeodeEmbedConfig::adapter

Optional adapter handle. When provided, Geode uses it for hardware workaround detection (e.g., Intel Arc + Vulkan alpha-coverage fallback). When null, workaround detection is skipped — the host is assumed to know its own hardware characteristics.

◆ device

wgpu::Device donner::geode::GeodeEmbedConfig::device

Host-provided WebGPU device. Must not be null.

◆ queue

wgpu::Queue donner::geode::GeodeEmbedConfig::queue

Host-provided queue associated with device. Must not be null.

◆ textureFormat

wgpu::TextureFormat donner::geode::GeodeEmbedConfig::textureFormat = wgpu::TextureFormat::RGBA8Unorm

Texture format for render targets. Must match the format of any texture passed to RendererGeode::setTargetTexture().


The documentation for this struct was generated from the following file: