载入中...
搜索中...
未找到
eve::asset_graphics::VegetationSceneGpuRuntime类 参考final

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 ( )

Vegetation scene gpu runtime.

在文件 EvpackVegetationScene.cpp 第 956 行定义.

引用了 release().

◆ VegetationSceneGpuRuntime()

eve::asset_graphics::VegetationSceneGpuRuntime::VegetationSceneGpuRuntime ( const VegetationSceneGpuRuntime &  )
delete

成员函数说明

◆ create()

Result< std::unique_ptr< VegetationSceneGpuRuntime > > eve::asset_graphics::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 
)
static

Bake, convert, upload and bind all field layers as one atomic candidate.

参数
factoryBorrowed graphics-thread factory which must outlive this runtime.
baseSurfaceBorrowed immutable source material snapshot.
baseMotionBorrowed immutable object motion snapshot; its explicit time drives the manager projection.
sceneBorrowed immutable decoded manager state.
masksBorrowed immutable decoded Element masks.
buildDetached 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()

std::size_t eve::asset_graphics::VegetationSceneGpuRuntime::deferredReleaseCount ( ) const
inlinenoexcept

Number of superseded field sets retained because their factory release must be retried.

在文件 EvpackVegetationScene.h 第 280 行定义.

◆ motion()

const graphics::VegetationMotion & eve::asset_graphics::VegetationSceneGpuRuntime::motion ( ) const
inlinenoexcept

Borrow the projected CPU motion snapshot; valid for this runtime's lifetime.

在文件 EvpackVegetationScene.h 第 276 行定义.

被这些函数引用 create().

◆ operator=()

VegetationSceneGpuRuntime & eve::asset_graphics::VegetationSceneGpuRuntime::operator= ( const VegetationSceneGpuRuntime &  )
delete

◆ release()

◆ 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.

参数
expectedRevisionRevision 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()

std::uint64_t eve::asset_graphics::VegetationSceneGpuRuntime::sourceRevision ( ) const
inlinenoexcept

Revision shared by the immutable scene input and every GPU field texture.

在文件 EvpackVegetationScene.h 第 278 行定义.

◆ surface()

const graphics::PbrSurface & eve::asset_graphics::VegetationSceneGpuRuntime::surface ( ) const
inlinenoexcept

Borrow the bound material snapshot; valid until release begins or destruction.

在文件 EvpackVegetationScene.h 第 274 行定义.


该类的文档由以下文件生成: