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

Capability-aware adapter from admitted .evpack assets to graphics resources. 更多...

#include <EvpackGraphicsLoader.h>

Public 成员函数

 EvpackGraphicsLoader (const asset::EvpackResourceReader &reader, graphics::IMeshResourceFactory &factory) noexcept
 Bind a reader and backend factory; both must outlive this adapter.
 
Result< LoadedGraphicsMesh > loadMesh (const AssetRef &asset, const asset::EvpackCapabilities &capabilities, const GraphicsAssetLoadLimits &limits={}, std::uint32_t texcoordSet=0, bool preserveAllTexcoords=false) const
 Validate and upload one canonical mesh v3 (or compatibility v1/v2) atomically.
 

详细描述

Capability-aware adapter from admitted .evpack assets to graphics resources.

在文件 EvpackGraphicsLoader.h 第 86 行定义.

构造及析构函数说明

◆ EvpackGraphicsLoader()

eve::asset_graphics::EvpackGraphicsLoader::EvpackGraphicsLoader ( const asset::EvpackResourceReader &  reader,
graphics::IMeshResourceFactory &  factory 
)
inlinenoexcept

Bind a reader and backend factory; both must outlive this adapter.

Reader.

在文件 EvpackGraphicsLoader.h 第 89 行定义.

成员函数说明

◆ loadMesh()

Result< LoadedGraphicsMesh > eve::asset_graphics::EvpackGraphicsLoader::loadMesh ( const AssetRef &  asset,
const asset::EvpackCapabilities &  capabilities,
const GraphicsAssetLoadLimits &  limits = {},
std::uint32_t  texcoordSet = 0,
bool  preserveAllTexcoords = false 
) const

Validate and upload one canonical mesh v3 (or compatibility v1/v2) atomically.

参数
texcoordSetUV channel to upload to the existing single-UV backend. Missing channels fail, except channel 0 on an untextured mesh. Other channels remain available through decodeCanonicalMesh. @thread Graphics thread; inputs are borrowed for this call, no callbacks or retained staging pointers.
preserveAllTexcoordsAttach every other UV channel through the factory before publication. Providers without that capability fail and the staged mesh is released.

Default mode explicitly projects one channel; full mode retains every channel.

返回
A borrowed backend-owned mesh on success. The caller releases it through the same IMeshResourceFactory; no backend object is created when package validation fails.

在文件 EvpackGraphicsLoader.cpp 第 8 行定义.

引用了 a, eve::asset::Bulk, eve::asset::RuntimeAssetChunk::bytes, c, count, eve::asset::decodeCanonicalMesh(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, limits, normals, eve::NotFound, eve::ParseError, payload, eve::asset::EvpackResourceReader::read(), eve::graphics::IMeshResourceFactory::releaseMesh(), eve::graphics::IMeshResourceFactory::setMeshTangentFrame(), eve::graphics::IMeshResourceFactory::setMeshTexcoords(), eve::Result< T >::success(), eve::TypeMismatch, eve::graphics::IMeshResourceFactory::uploadMesh(), eve::graphics::IMeshResourceFactory::uploadMeshColored(), uv, values, variant , 以及 w.

被这些函数引用 eve::asset_graphics::EvpackStaticPrefab::load().


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