载入中...
搜索中...
未找到
GraphicsMeshFactoryAdapter.cpp
浏览该文件的文档.
7Result<void> GraphicsMeshFactoryAdapter::setMeshTangentFrame(graphics::Mesh* mesh, std::span<const float> tangents,
9 if (!mesh) return Result<void>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "null mesh"));
35 Diagnostic::error(DiagnosticCode::Failed, "graphics backend rejected colored canonical mesh upload", {}, {},
43 DiagnosticCode::InvalidArgument, "cannot release a null graphics mesh", {}, {}, "asset.graphics.adapter"));
45 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Failed, "graphics backend rejected mesh release",
50Result<void> GraphicsMeshFactoryAdapter::setMeshTexcoords(graphics::Mesh* mesh, std::uint32_t set,
54 Diagnostic::error(DiagnosticCode::InvalidArgument, "null mesh", {}, {}, "asset.graphics.adapter"));
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< void > setMeshTangentFrame(graphics::Mesh *mesh, std::span< const float > tangents, std::span< const float > bitangents) override
Attach authored XYZ tangent and bitangent streams before mesh publication.
Definition GraphicsMeshFactoryAdapter.cpp:7
Result< void > releaseMesh(graphics::Mesh *mesh) override
Release a mesh previously returned by this factory.
Definition GraphicsMeshFactoryAdapter.cpp:40
Result< graphics::Mesh * > uploadMesh(const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const std::uint32_t *indices, int indexCount) override
Upload validated, tightly packed mesh arrays.
Definition GraphicsMeshFactoryAdapter.cpp:16
Result< graphics::Mesh * > uploadMeshColored(const float *posXYZ, const float *nrmXYZ, const float *uvST, const float *colorRGBA, int vertexCount, const std::uint32_t *indices, int indexCount) override
Upload a mesh with a tightly packed linear RGBA vertex-color stream.
Definition GraphicsMeshFactoryAdapter.cpp:28
Result< void > setMeshTexcoords(graphics::Mesh *mesh, std::uint32_t set, std::span< const float > values) override
Attach an owning UV stream to an uploaded mesh before publication. @thread Graphics thread; input is ...
Definition GraphicsMeshFactoryAdapter.cpp:50
virtual Mesh * newMeshFromArrays(const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
Creates a mesh from arrays. @ownership Caller deletes unless documented otherwise.
virtual Mesh * newMeshFromArraysColored(const float *posXYZ, const float *nrmXYZ, const float *uvST, const float *colorRGBA, int vertexCount, const uint32_t *indices, int indexCount)=0
Create a mesh with a packed linear RGBA vertex-color stream.
Definition CookedMaterial.cpp:5
@ InvalidArgument
@ Failed