载入中...
搜索中...
未找到
EvpackGraphicsLoader.cpp
浏览该文件的文档.
23 DiagnosticCode::ParseError, "eve.mesh must contain exactly one bulk chunk", {}, {}, "asset.graphics"));
28 Diagnostic::error(DiagnosticCode::NotFound, "eve.mesh bulk chunk is missing", {}, {}, "asset.graphics"));
37 if (uv == staging.value().texcoords.end() && (texcoordSet != 0 || !staging.value().texcoords.empty()))
39 DiagnosticCode::NotFound, "requested UV set is absent; no remapping performed", {}, {}, "asset.graphics"));
59 if (a.components != 4 || a.values.size() != count * 4 || staging.value().normals.size() != count * 3)
104 return Result<LoadedGraphicsMesh>::success({asset, uploaded.value(), std::move(payload).takeValue().variant,
Transactional graphics consumers for canonical runtime assets.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Result< RuntimeAssetPayload > read(const AssetRef &asset, std::string_view expectedType, const EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes) const
Resolve, type-check, variant-select and decode a canonical runtime asset.
Definition EvpackResourceReader.cpp:10
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.
Definition EvpackGraphicsLoader.cpp:8
virtual Result< void > setMeshTangentFrame(Mesh *, std::span< const float >, std::span< const float >)
Attach authored XYZ tangent and bitangent streams before mesh publication.
Definition IMeshResourceFactory.h:57
virtual Result< void > releaseMesh(Mesh *mesh)=0
Release a mesh previously returned by this factory.
virtual Result< void > setMeshTexcoords(Mesh *, std::uint32_t, std::span< const float >)
Attach an owning UV stream to an uploaded mesh before publication. @thread Graphics thread; input is ...
Definition IMeshResourceFactory.h:46
virtual Result< Mesh * > uploadMesh(const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const std::uint32_t *indices, int indexCount)=0
Upload validated, tightly packed mesh arrays.
virtual Result< Mesh * > uploadMeshColored(const float *, const float *, const float *, const float *, int, const std::uint32_t *, int)
Upload a mesh with a tightly packed linear RGBA vertex-color stream.
Definition IMeshResourceFactory.h:35
Definition CookedMaterial.cpp:5
Result< CanonicalMeshData > decodeCanonicalMesh(std::span< const std::uint8_t > bytes, const CanonicalMeshLimits &limits)
Decode canonical EVMESH binary v1, v2 or v3 into independently owned arrays.
Definition CanonicalMesh.cpp:22
@ InvalidArgument
@ TypeMismatch
A stable reference resolved to a different canonical domain type.
@ NotFound
@ Failed
@ ParseError
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
One decoded runtime chunk with its admitted semantic metadata.
Definition EvpackResourceReader.h:13
std::vector< std::uint8_t > bytes
Definition EvpackResourceReader.h:16
Bounds applied before allocating canonical mesh staging arrays.
Definition EvpackGraphicsLoader.h:35