载入中...
搜索中...
未找到
TerrainVegetationGpu.h
浏览该文件的文档.
1#pragma once
2
7
8#include <memory>
9
10namespace eve::graphics {
11class Graphics;
12}
13
14namespace eve::asset_procgen {
15
20 std::uint32_t flags = 0x7u;
23 struct Part {
24 std::array<float, 16> localTransform{};
27 std::uint32_t flags = 0x7u;
29 };
31 std::vector<Part> parts;
32};
33
39
42public:
44 virtual ~ITerrainVegetationGpuResolver() = default;
45
54 const TerrainVegetationGpuPrototypeRequest& prototype) = 0;
55
65 [[nodiscard]] virtual Result<void> drawShadow(
67 const std::array<float, 16>& transform,
68 const std::array<float, 16>& lightViewProjection) = 0;
69};
70
73 std::vector<graphics::GpuInstance> instances;
74};
75
78 double timeSeconds = 0.0;
79};
80
90 const TerrainVegetationGpuFrame& frame = {});
91
98 const TerrainVegetationRealization& realization,
99 ITerrainVegetationGpuResolver& resolver,
100 const TerrainVegetationGpuFrame& frame = {});
101
110public:
120
122 [[nodiscard]] Result<void> setFrame(TerrainVegetationGpuFrame frame);
129 [[nodiscard]] const Diagnostic* lastSubmissionError() const;
130
131private:
132 struct State;
133 std::unique_ptr<State> state_;
134 std::uint64_t drawerToken_ = 0;
135 std::uint64_t shadowDrawerToken_ = 0;
136};
137
138} // namespace eve::asset_procgen
#define EVENGINE_API_ORCHESTRATION
Definition Export.h:111
Runtime realization of terrain vegetation assets.
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
Provider boundary from stable prototype names to backend table slots.
virtual Result< TerrainVegetationGpuPrototype > resolve(const TerrainVegetationGpuPrototypeRequest &prototype)=0
Resolve one prototype and optional terrain Detail metadata without mutating the realization.
virtual Result< void > drawShadow(const TerrainVegetationGpuPrototypeRequest &prototype, const std::array< float, 16 > &transform, const std::array< float, 16 > &lightViewProjection)=0
Submit one realized instance inside an active cascade shadow pass.
virtual ~ITerrainVegetationGpuResolver()=default
Releases ITerrainVegetationGpuResolver resources.
Own one realized terrain Detail set and submit it from RenderSystem3D's forward phase.
TerrainVegetationRenderer(TerrainVegetationRenderer &&)=delete
TerrainVegetationRenderer(const TerrainVegetationRenderer &)=delete
TerrainVegetationRenderer & operator=(const TerrainVegetationRenderer &)=delete
TerrainVegetationRenderer & operator=(TerrainVegetationRenderer &&)=delete
Result< void > submitTerrainVegetation(graphics::Graphics &graphics, const TerrainVegetationRealization &realization, ITerrainVegetationGpuResolver &resolver, const TerrainVegetationGpuFrame &frame)
Build and submit one terrain vegetation realization to the current GPU-driven frame.
Result< TerrainVegetationGpuPlan > buildTerrainVegetationGpuPlan(const TerrainVegetationRealization &realization, ITerrainVegetationGpuResolver &resolver, const TerrainVegetationGpuFrame &frame)
Resolve every prototype and build GPU records transactionally.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
constexpr uint32_t kInvalidGpuDrivenSlot
GPU-driven rendering shared constants + std430 GPU layouts.
Runtime vegetation prototype metadata retained from the source terrain.
Explicit frame inputs for deterministic terrain Detail animation.
Detached CPU upload plan accepted by both Vulkan and WebGPU GPU-driven paths.
std::vector< graphics::GpuInstance > instances
One owning realization's prototype request passed to the graphics resource provider.
GPU table slots resolved for one vegetation prototype.
Owning, prototype-sorted result plus scalability evidence.