Skip to main content

WGContext

The WGContext class is a WebGPU-specific implementation of the Context class. It facilitates the creation of a rendering context using an externally provided WebGPU instance, adapter, and device. The class provides access to the underlying WebGPU instance, adapter, and device.

#include <platform/TellusimContext.h>

Inheritance

Constructors

WGContext()

Methods

Open context.

static bool open(WGPUInstance instance, WGPUAdapter adapter, WGPUDevice device)

Create context.

bool create(WGPUInstance instance, WGPUAdapter adapter, WGPUDevice device)

Current context.

WGPUInstance getInstance() const
WGPUAdapter getAdapter() const
WGPUDevice getDevice() const