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

Owning static-prefab GPU leases and immutable draw transforms; no ECS or Scene mutation. @ownership Mesh/image factories must outlive this object and its explicit release; the factories own GPU allocations. @lifetime Release before backend shutdown/device loss. Reimport builds a separate candidate; swap only after success. @thread Creation, drawing, release and destruction are graphics-thread affine. @reentrancy No scripts or caller callbacks and no locks; do not reenter from backend methods. 更多...

#include <EvpackStaticPrefab.h>

类

struct  Impl
 

Public 成员函数

 ~EvpackStaticPrefab ()
 Evpack static prefab.
 
 EvpackStaticPrefab (const EvpackStaticPrefab &)=delete
 
EvpackStaticPrefab & operator= (const EvpackStaticPrefab &)=delete
 
std::size_t drawCount () const noexcept
 Number of enabled static renderer bindings prepared for drawing.
 
Result< std::vector< StaticPrefabGpuPart > > prepareGpuDriven (graphics::Graphics &graphics)
 Register every opaque or masked prefab draw in GPU-driven tables transactionally.
 
Result< void > draw (graphics::Graphics &graphics, const std::array< float, 16 > &transform, const std::array< float, 16 > &cameraView) const
 Draw in an already-open 3D pass using its camera/light state and a column-major instance transform.
 
Result< void > drawShadow (graphics::Graphics &graphics, const std::array< float, 16 > &transform, const std::array< float, 16 > &lightViewProjection) const
 Submit enabled source shadow casters inside an active cascade shadow pass.
 
Result< void > release ()
 Invalidate draw packets and release all leases; failed releases remain owned for retry.
 

静态 Public 成员函数

static Result< std::unique_ptr< EvpackStaticPrefab > > load (const asset::EvpackResourceReader &reader, graphics::IMeshResourceFactory &meshes, graphics::IImageResourceFactory &images, const AssetRef &asset, const asset::EvpackCapabilities &capabilities)
 Validate a template and stage its mesh, material and image dependencies; failures release staged uploads.
 

详细描述

Owning static-prefab GPU leases and immutable draw transforms; no ECS or Scene mutation. @ownership Mesh/image factories must outlive this object and its explicit release; the factories own GPU allocations. @lifetime Release before backend shutdown/device loss. Reimport builds a separate candidate; swap only after success. @thread Creation, drawing, release and destruction are graphics-thread affine. @reentrancy No scripts or caller callbacks and no locks; do not reenter from backend methods.

在文件 EvpackStaticPrefab.h 第 34 行定义.

构造及析构函数说明

◆ ~EvpackStaticPrefab()

eve::asset_graphics::EvpackStaticPrefab::~EvpackStaticPrefab ( )

Evpack static prefab.

在文件 EvpackStaticPrefab.cpp 第 45 行定义.

引用了 release().

◆ EvpackStaticPrefab()

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

成员函数说明

◆ draw()

Result< void > eve::asset_graphics::EvpackStaticPrefab::draw ( graphics::Graphics &  graphics,
const std::array< float, 16 > &  transform,
const std::array< float, 16 > &  cameraView 
) const

Draw in an already-open 3D pass using its camera/light state and a column-major instance transform.

参数
graphicsBorrowed backend corresponding to the factories used at load.
transformFinite column-major instance transform; borrowed only during this call.
cameraViewFinite right-handed column-major view matrix, borrowed for per-prefab transparent sorting.
返回
Success or invalid-transform/released-state error before issuing draws.
备注
Draws opaque PBR first, then transparent submeshes back-to-front by node origin within this prefab; caller orders separate prefab instances for transparency. Sets material state; caller restores any state needed by subsequent custom draws. No shadow pass is submitted.

在文件 EvpackStaticPrefab.cpp 第 239 行定义.

引用了 a, b, color, draw, eve::graphics::Graphics::drawMesh(), eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::graphics::Masked, eve::graphics::Opaque, order, eve::graphics::Graphics::setMesh3DHeightTexture(), eve::graphics::Graphics::setMesh3DMaterial(), eve::graphics::Graphics::setMesh3DNormalTexture(), eve::graphics::Graphics::setMesh3DParallax(), eve::graphics::Graphics::setMesh3DPbrSurface(), eve::graphics::Graphics::setMesh3DShadowReceive(), eve::graphics::Graphics::setMesh3DSurface(), eve::graphics::Graphics::setMesh3DTexCellBomb(), eve::graphics::Graphics::setMesh3DVirtualTexture(), eve::graphics::Transparent, value , 以及 view.

◆ drawCount()

std::size_t eve::asset_graphics::EvpackStaticPrefab::drawCount ( ) const
noexcept

Number of enabled static renderer bindings prepared for drawing.

在文件 EvpackStaticPrefab.cpp 第 49 行定义.

◆ drawShadow()

Result< void > eve::asset_graphics::EvpackStaticPrefab::drawShadow ( graphics::Graphics &  graphics,
const std::array< float, 16 > &  transform,
const std::array< float, 16 > &  lightViewProjection 
) const

Submit enabled source shadow casters inside an active cascade shadow pass.

参数
graphicsBorrowed backend corresponding to the factories used at load.
transformFinite column-major prefab instance transform.
lightViewProjectionFinite column-major cascade light view-projection matrix.
返回
Success, or a structured released/transform error before issuing draws. @thread Graphics thread only; synchronous and non-reentrant.

在文件 EvpackStaticPrefab.cpp 第 285 行定义.

引用了 doubleSided, draw, eve::graphics::Graphics::drawMeshShadow(), eve::graphics::Graphics::drawMeshShadowAlpha(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::Inherit, eve::InvalidArgument, lightVP, eve::graphics::None, eve::Result< T >::success() , 以及 value.

◆ load()

Result< std::unique_ptr< EvpackStaticPrefab > > eve::asset_graphics::EvpackStaticPrefab::load ( const asset::EvpackResourceReader &  reader,
graphics::IMeshResourceFactory &  meshes,
graphics::IImageResourceFactory &  images,
const AssetRef &  asset,
const asset::EvpackCapabilities &  capabilities 
)
static

Validate a template and stage its mesh, material and image dependencies; failures release staged uploads.

返回
Owning renderer candidate or structured error; existing renderers are untouched.
参数
readerBorrowed only during load; returned data does not retain the reader or package.
meshesBorrowed backend factory that must outlive the returned object.
imagesBorrowed backend factory that must outlive the returned object.

在文件 EvpackStaticPrefab.cpp 第 166 行定义.

引用了 binding, caps, eve::Diagnostic::error(), eve::AssetRef::format(), image, eve::InvalidArgument, eve::asset_graphics::EvpackImageLoader::load(), eve::asset_scene::EvpackSceneTemplateLoader::load(), eve::asset_graphics::EvpackGraphicsLoader::loadMesh(), local, node, parent, eve::asset_graphics::detail::readCookedMaterial(), scene, eve::graphics::validatePbrSurface() , 以及 world.

被这些函数引用 eve::asset_procgen::TerrainDetailGpuResolver::resolve().

◆ operator=()

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

◆ prepareGpuDriven()

Result< std::vector< StaticPrefabGpuPart > > eve::asset_graphics::EvpackStaticPrefab::prepareGpuDriven ( graphics::Graphics &  graphics)

Register every opaque or masked prefab draw in GPU-driven tables transactionally.

参数
graphicsBorrowed backend corresponding to the factories used during load.
返回
Owning part descriptors; material objects remain owned by this prefab until release. @thread Graphics thread only; synchronous and non-reentrant.

在文件 EvpackStaticPrefab.cpp 第 83 行定义.

引用了 binding, count, draw, eve::Diagnostic::error(), eve::graphics::Graphics::gpuDrivenMaterialRecord(), eve::graphics::Graphics::gpuDrivenMaterialUsable(), eve::graphics::Graphics::gpuDrivenMeshRecord(), eve::graphics::Graphics::gpuDrivenReleaseMaterialRecord(), image, eve::InvalidArgument, eve::graphics::kInvalidGpuDrivenSlot, eve::asset_graphics::StaticPrefabGpuPart::localTransform, material, eve::asset_graphics::StaticPrefabGpuPart::materialId, eve::asset_graphics::StaticPrefabGpuPart::meshId, eve::graphics::Normal, owned, parts, eve::Result< T >::success() , 以及 eve::graphics::TangentXYZ.

◆ release()

Result< void > eve::asset_graphics::EvpackStaticPrefab::release ( )

Invalidate draw packets and release all leases; failed releases remain owned for retry.

返回
Backend failure if any release fails. Destructor retries and reports remaining errors to stderr.

在文件 EvpackStaticPrefab.cpp 第 50 行定义.

引用了 eve::Status::isFailure(), material , 以及 eve::Result< T >::success().

被这些函数引用 ~EvpackStaticPrefab().


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