Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::svg::RendererGeodeTextureSnapshot Class Referencefinal

WebGPU texture snapshot exported by RendererGeode. More...

#include "donner/svg/renderer/RendererGeode.h"

Inheritance diagram for donner::svg::RendererGeodeTextureSnapshot:
[legend]
Collaboration diagram for donner::svg::RendererGeodeTextureSnapshot:
[legend]

Public Member Functions

 RendererGeodeTextureSnapshot (std::shared_ptr< geode::GeodeDevice > device, wgpu::Texture texture, Vector2i dimensions, wgpu::TextureFormat format)
 Construct a Geode texture snapshot.
RendererTextureSnapshotBackend backend () const override
 Renderer backend that produced this texture.
Vector2i dimensions () const override
 Pixel dimensions of the texture in device pixels.
AlphaType alphaType () const override
 Alpha interpretation of the texture contents.
const wgpu::Texture & texture () const
 Resolved single-sample WebGPU texture.
const wgpu::TextureView & textureView () const
 Lazily-created texture view suitable for ImGui_ImplWGPU's ImTextureID.
wgpu::TextureFormat format () const
 WebGPU texture format.

Detailed Description

WebGPU texture snapshot exported by RendererGeode.

The snapshot keeps the backing geode::GeodeDevice and texture alive so editor presentation code can sample the texture after the renderer has moved on to a later frame.

Constructor & Destructor Documentation

◆ RendererGeodeTextureSnapshot()

donner::svg::RendererGeodeTextureSnapshot::RendererGeodeTextureSnapshot ( std::shared_ptr< geode::GeodeDevice > device,
wgpu::Texture texture,
Vector2i dimensions,
wgpu::TextureFormat format )

Construct a Geode texture snapshot.

Parameters
deviceShared Geode device that owns the WebGPU handle lifetime.
textureResolved single-sample texture containing the rendered frame.
dimensionsTexture dimensions in device pixels.
formatTexture format.

Member Function Documentation

◆ alphaType()

AlphaType donner::svg::RendererGeodeTextureSnapshot::alphaType ( ) const
inlinenodiscardoverridevirtual

Alpha interpretation of the texture contents.

Implements donner::svg::RendererTextureSnapshot.

◆ backend()

RendererTextureSnapshotBackend donner::svg::RendererGeodeTextureSnapshot::backend ( ) const
inlinenodiscardoverridevirtual

Renderer backend that produced this texture.

Reimplemented from donner::svg::RendererTextureSnapshot.

◆ dimensions()

Vector2i donner::svg::RendererGeodeTextureSnapshot::dimensions ( ) const
inlinenodiscardoverridevirtual

Pixel dimensions of the texture in device pixels.

Implements donner::svg::RendererTextureSnapshot.


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