Class SceneUploader

Class Documentation

class SceneUploader

Declaration: final

Provider-domain upload/cache handle constructed on platform.

Copies may submit owned CPU recordings from UI; direct upload/cache access stays on the original provider/owner.

See also

UI publication

Public Functions

explicit SceneUploader(const CE::Rendering::Resources::Provider &provider)

Capture provider domain identity and creating thread for later uploads.

Does not build defaults eagerly; provider/backend ownership must remain valid for direct use and submitted work.

Scene upload(CE::Rendering::Resources::Provider &provider, const RecordedScene &recording) const

Declaration: [[nodiscard]]

Upload recording on the original provider and platform owner.

Lazily request provider-owned builtin UI materials for the first nonempty scene; unsupported providers reject. Empty recordings require no defaults. Input recording remains reusable; returned Scene retains resources. Failure throws without returning a partial scene; prior scenes remain valid.

Scene upload(CE::Rendering::Resources::Provider &provider, const RecordedScene &recording, const Materials &materials) const

Declaration: [[nodiscard]]

Upload with explicit retained material/pass overrides instead of defaults.

Validate colored triangle layout, straight alpha, disabled depth/write/culling, projection and image sampler semantics. Invalid overrides/provider metadata or upload/allocation failures throw; empty Materials is an explicit override and fails for draws requiring missing handles. Native transient retirement is not atomic rollback.

std::future<Scene> submit(const CE::Runtime::PlatformDispatcher::Submission &platform, RecordedScene recording) const

Declaration: [[nodiscard]]

Submit owned recording and uploader state through the platform endpoint; no live toolkit objects are captured.

The future delivers a complete default-material Scene or an upload/cancellation error. Submission itself may throw; the dispatcher’s resources must match the original provider domain.

std::future<Scene> submit(const CE::Runtime::PlatformDispatcher::Submission &platform, RecordedScene recording, Materials materials) const

Declaration: [[nodiscard]]

Submit owned recording and material overrides to the matching platform provider.

Future exceptions preserve the caller’s prior scene; copied resource handles retain logical ownership without extending native context lifetime.