载入中...
搜索中...
未找到
TerrainDetailGpuResolver.h
浏览该文件的文档.
1#pragma once
2
6
7#include <memory>
8
9namespace eve::asset {
10class EvpackResourceReader;
11struct EvpackCapabilities;
12}
13
14namespace eve::graphics {
15class Graphics;
16}
17
18namespace eve::asset_procgen {
19
28public:
31 const asset::EvpackCapabilities& capabilities, graphics::Graphics& graphics);
36
39 const TerrainVegetationGpuPrototypeRequest& prototype) override;
40
42 [[nodiscard]] Result<void> drawShadow(
44 const std::array<float, 16>& transform,
45 const std::array<float, 16>& lightViewProjection) override;
46
48 [[nodiscard]] Result<void> release();
49
50private:
51 struct Impl;
52 std::unique_ptr<Impl> impl_;
53};
54
63public:
74 const asset::EvpackResourceReader& reader, const asset::EvpackCapabilities& capabilities,
75 graphics::Graphics& graphics, const AssetRef& asset, const TerrainVegetationLimits& limits = {});
76
81
84
90 [[nodiscard]] const Diagnostic* lastSubmissionError() const;
91
93 [[nodiscard]] Result<void> release();
94
95private:
97 const asset::EvpackCapabilities& capabilities, graphics::Graphics& graphics);
98
99 std::unique_ptr<TerrainDetailGpuResolver> resolver_;
100 std::unique_ptr<TerrainVegetationRenderer> renderer_;
101};
102
103} // namespace eve::asset_procgen
GPU-driven adapter for realized terrain vegetation.
const AssetImportLimits & limits
Stable asset identity backed by PersistentId.
Definition ResourceRef.h:53
A structured explanation of a failed, degraded, or noteworthy result.
Definition Diagnostic.h:94
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Immutable reader retaining an admitted pack by shared ownership.
Provider boundary from stable prototype names to backend table slots.
Owning lazy GPU resource resolver for texture-backed terrain Detail prototypes. @ownership Uploaded m...
Result< TerrainVegetationGpuPrototype > resolve(const TerrainVegetationGpuPrototypeRequest &prototype) override
Load and cache one Detail card, image, and masked material transactionally.
~TerrainDetailGpuResolver() override
Releases TerrainDetailGpuResolver resources.
TerrainDetailGpuResolver(const TerrainDetailGpuResolver &)=delete
Result< void > drawShadow(const TerrainVegetationGpuPrototypeRequest &prototype, const std::array< float, 16 > &transform, const std::array< float, 16 > &lightViewProjection) override
Draw one realized Detail instance in the active cascade shadow pass.
TerrainDetailGpuResolver & operator=(const TerrainDetailGpuResolver &)=delete
Result< void > release()
Release all backend leases; failed releases remain owned for retry.
Owning runtime for one cooked Unity Terrain Detail instance set. @ownership Owns the realization,...
static Result< std::unique_ptr< TerrainDetailRuntime > > load(const asset::EvpackResourceReader &reader, const asset::EvpackCapabilities &capabilities, graphics::Graphics &graphics, const AssetRef &asset, const TerrainVegetationLimits &limits={})
Load, realize, and register one Detail set atomically; GPU resources resolve on first render.
Result< void > setFrame(TerrainVegetationGpuFrame frame)
Update the absolute simulation time used for deterministic grass motion.
TerrainDetailRuntime(const TerrainDetailRuntime &)=delete
Result< void > release()
Unregister rendering and release all backend resources; safe to retry after failure.
~TerrainDetailRuntime()
Releases TerrainDetailRuntime resources.
TerrainDetailRuntime & operator=(const TerrainDetailRuntime &)=delete
const Diagnostic * lastSubmissionError() const
Return the latest asynchronous render-submission diagnostic, if any. @ownership Borrowed; the runtime...
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
Explicit frame inputs for deterministic terrain Detail animation.
One owning realization's prototype request passed to the graphics resource provider.
Hard limits for one deterministic terrain vegetation realization.