Owning GPU publication of one immutable TVE manager scene. The resource factory, mask map and scene are borrowed only while create executes. The returned runtime owns the field textures and projected material snapshot. It must outlive every draw borrowing surface(). 更多...
#include <EvpackVegetationScene.h>
Public 成员函数 | |
| ~VegetationSceneGpuRuntime () | |
| Vegetation scene gpu runtime. | |
| VegetationSceneGpuRuntime (const VegetationSceneGpuRuntime &)=delete | |
| VegetationSceneGpuRuntime & | operator= (const VegetationSceneGpuRuntime &)=delete |
| const graphics::PbrSurface & | surface () const noexcept |
| Borrow the bound material snapshot; valid until release begins or destruction. | |
| const graphics::VegetationMotion & | motion () const noexcept |
| Borrow the projected CPU motion snapshot; valid for this runtime's lifetime. | |
| std::uint64_t | sourceRevision () const noexcept |
| Revision shared by the immutable scene input and every GPU field texture. | |
| std::size_t | deferredReleaseCount () const noexcept |
| Number of superseded field sets retained because their factory release must be retried. | |
| Result< VegetationSceneGpuPublication > | replace (std::uint64_t expectedRevision, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build) |
| Atomically replace this runtime after validating its observed revision. A complete candidate is built before publication. Failure preserves the current surface and revision. Superseded textures are released after publication; failed releases remain owned for release() retry. | |
| Result< void > | release () |
| Invalidate material borrows and release all fields; failed entries remain owned for retry. | |
静态 Public 成员函数 | |
| static Result< std::unique_ptr< VegetationSceneGpuRuntime > > | create (graphics::IResourceFactory &factory, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build) |
| Bake, convert, upload and bind all field layers as one atomic candidate. | |
详细描述
Owning GPU publication of one immutable TVE manager scene. The resource factory, mask map and scene are borrowed only while create executes. The returned runtime owns the field textures and projected material snapshot. It must outlive every draw borrowing surface().
在文件 EvpackVegetationScene.h 第 250 行定义.
构造及析构函数说明
◆ ~VegetationSceneGpuRuntime()
| eve::asset_graphics::VegetationSceneGpuRuntime::~VegetationSceneGpuRuntime | ( | ) |
◆ VegetationSceneGpuRuntime()
|
delete |
成员函数说明
◆ create()
|
static |
Bake, convert, upload and bind all field layers as one atomic candidate.
- 参数
-
factory Borrowed graphics-thread factory which must outlive this runtime. baseSurface Borrowed immutable source material snapshot. baseMotion Borrowed immutable object motion snapshot; its explicit time drives the manager projection. scene Borrowed immutable decoded manager state. masks Borrowed immutable decoded Element masks. build Detached atlas geometry, optional raster inputs, GPU leases and nonzero source revision.
- 返回
- Owning runtime, or failure after releasing every candidate GPU allocation. @thread Graphics thread only; synchronous, non-reentrant and without callbacks.
在文件 EvpackVegetationScene.cpp 第 846 行定义.
引用了 eve::asset_graphics::bakeVegetationSceneChannel(), eve::graphics::bindVegetationGpuFields(), eve::graphics::VegetationGpuRuntime::cameraFadeMax, eve::graphics::VegetationGpuRuntime::cameraFadeMin, eve::asset_graphics::VegetationSceneGpuBuild::channels, eve::asset_graphics::convertVegetationSceneChannelToNative(), eve::Diagnostic::error(), eve::graphics::VegetationMotion::fadeDistance, eve::graphics::VegetationGpuRuntime::fadeNoiseTiling, eve::Failed, eve::graphics::VegetationGpuRuntime::globalBending, eve::graphics::VegetationMotion::globalBending, eve::graphics::VegetationGpuRuntime::globalBranch, eve::graphics::VegetationMotion::globalBranch, eve::graphics::VegetationGpuRuntime::globalFlutter, eve::graphics::VegetationMotion::globalFlutter, input, eve::InvalidArgument, layer, motion(), eve::graphics::VegetationGpuRuntime::motionDirection, eve::graphics::VegetationGpuRuntime::motionFadeDistance, eve::graphics::VegetationGpuRuntime::noiseTiling, eve::graphics::VegetationMotion::noiseTiling, projected, eve::asset_graphics::projectVegetationScene(), eve::asset_graphics::VegetationSceneGpuBuild::runtime, scene, eve::asset_graphics::VegetationSceneGpuBuild::sourceRevision, eve::graphics::VegetationGpuRuntime::time, eve::graphics::uploadVegetationGpuFieldSet(), eve::graphics::VegetationGpuRuntime::worldOrigin , 以及 eve::graphics::VegetationMotion::worldOrigin.
被这些函数引用 eve::asset_graphics::VegetationSceneInstance::create() , 以及 replace().
◆ deferredReleaseCount()
|
inlinenoexcept |
Number of superseded field sets retained because their factory release must be retried.
在文件 EvpackVegetationScene.h 第 280 行定义.
◆ motion()
|
inlinenoexcept |
Borrow the projected CPU motion snapshot; valid for this runtime's lifetime.
在文件 EvpackVegetationScene.h 第 276 行定义.
被这些函数引用 create().
◆ operator=()
|
delete |
◆ release()
| Result< void > eve::asset_graphics::VegetationSceneGpuRuntime::release | ( | ) |
Invalidate material borrows and release all fields; failed entries remain owned for retry.
在文件 EvpackVegetationScene.cpp 第 962 行定义.
引用了 current, eve::Result< T >::failure(), eve::Status::isFailure(), eve::Status::isSuccess(), eve::graphics::releaseVegetationGpuFieldSet(), retired, eve::Result< T >::success(), eve::asset_graphics::VegetationSceneProjection::surface, eve::graphics::PbrVegetationExtras::texture, eve::graphics::PbrVegetationColors::texture, eve::graphics::PbrVegetationVertex::texture, eve::graphics::PbrVegetationMotion::texture, eve::graphics::PbrSurface::vegetationColors, eve::graphics::PbrSurface::vegetationExtras, eve::graphics::PbrSurface::vegetationMotion , 以及 eve::graphics::PbrSurface::vegetationVertex.
被这些函数引用 ~VegetationSceneGpuRuntime().
◆ replace()
| Result< VegetationSceneGpuPublication > eve::asset_graphics::VegetationSceneGpuRuntime::replace | ( | std::uint64_t | expectedRevision, |
| const graphics::PbrSurface & | baseSurface, | ||
| const graphics::VegetationMotion & | baseMotion, | ||
| const LoadedVegetationScene & | scene, | ||
| const std::map< std::string, graphics::VegetationMask > & | masks, | ||
| const VegetationSceneGpuBuild & | build | ||
| ) |
Atomically replace this runtime after validating its observed revision. A complete candidate is built before publication. Failure preserves the current surface and revision. Superseded textures are released after publication; failed releases remain owned for release() retry.
- 参数
-
expectedRevision Revision observed by the caller before preparing the replacement.
- 返回
- New revision and observable deferred cleanup count, or Conflict/validation failure without publication. @thread Graphics thread only; synchronous, non-reentrant and without callbacks.
在文件 EvpackVegetationScene.cpp 第 913 行定义.
引用了 eve::Conflict, create(), current, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::graphics::releaseVegetationGpuFieldSet(), scene, eve::asset_graphics::VegetationSceneGpuBuild::sourceRevision , 以及 eve::Result< T >::success().
◆ sourceRevision()
|
inlinenoexcept |
Revision shared by the immutable scene input and every GPU field texture.
在文件 EvpackVegetationScene.h 第 278 行定义.
◆ surface()
|
inlinenoexcept |
Borrow the bound material snapshot; valid until release begins or destruction.
在文件 EvpackVegetationScene.h 第 274 行定义.
该类的文档由以下文件生成:
- src/modules/asset/graphics/EvpackVegetationScene.h
- src/modules/asset/graphics/EvpackVegetationScene.cpp