Result-based adapter over the engine's established graphics resource factory. 更多...
#include <EvpackGraphicsLoader.h>
Public 成员函数 | |
| GraphicsMeshFactoryAdapter (graphics::IResourceFactory &factory) noexcept | |
| Bind a borrowed graphics factory that must outlive this adapter. | |
| 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. | |
| 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. | |
| Result< void > | releaseMesh (graphics::Mesh *mesh) override |
| Release a mesh previously returned by this factory. | |
| 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 borrowed synchronously, without callbacks. | |
| 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. | |
Public 成员函数 继承自 eve::graphics::IMeshResourceFactory | |
| virtual | ~IMeshResourceFactory ()=default |
| Releases IMeshResourceFactory resources. | |
详细描述
Result-based adapter over the engine's established graphics resource factory.
在文件 EvpackGraphicsLoader.h 第 42 行定义.
构造及析构函数说明
◆ GraphicsMeshFactoryAdapter()
|
inlineexplicitnoexcept |
Bind a borrowed graphics factory that must outlive this adapter.
Factory.
在文件 EvpackGraphicsLoader.h 第 45 行定义.
成员函数说明
◆ releaseMesh()
|
overridevirtual |
Release a mesh previously returned by this factory.
- 参数
-
mesh Borrowed live mesh owned by this factory; not retained after the call. @thread Must run on the graphics thread. mesh Borrowed factory-owned mesh, observed only for this call.
Release mesh.
实现了 eve::graphics::IMeshResourceFactory.
在文件 GraphicsMeshFactoryAdapter.cpp 第 40 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, mesh, eve::graphics::IResourceFactory::releaseMesh() , 以及 eve::Result< T >::success().
◆ setMeshTangentFrame()
|
overridevirtual |
Attach authored XYZ tangent and bitangent streams before mesh publication.
- 备注
- Graphics thread; synchronous borrowed inputs, no callbacks. Provider owns copies.
- 返回
- Unsupported without tangent support; failure must leave the mesh unchanged.
Sets the mesh tangent frame.
重载 eve::graphics::IMeshResourceFactory .
在文件 GraphicsMeshFactoryAdapter.cpp 第 7 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 mesh.
◆ setMeshTexcoords()
|
overridevirtual |
Attach an owning UV stream to an uploaded mesh before publication. @thread Graphics thread; input is borrowed synchronously, without callbacks.
- 返回
- Unsupported for providers without multi-UV support; no mutation on failure.
Sets the mesh texcoords.
重载 eve::graphics::IMeshResourceFactory .
在文件 GraphicsMeshFactoryAdapter.cpp 第 50 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, mesh , 以及 values.
◆ uploadMesh()
|
overridevirtual |
Upload validated, tightly packed mesh arrays.
- 返回
- Structured failure or a borrowed backend-owned mesh. @ownership The backend factory owns the returned mesh; caller must release it through this factory. @lifetime Valid until
releaseMesh, backend shutdown, or graphics-device loss. @thread Must run on the graphics thread. All borrowed input arrays are consumed synchronously. @ownership Returned mesh remains owned by the bound graphics factory. @lifetime Valid until release, backend shutdown, or device loss.
Uploads mesh.
实现了 eve::graphics::IMeshResourceFactory.
在文件 GraphicsMeshFactoryAdapter.cpp 第 16 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), indexCount, indices, mesh, eve::graphics::IResourceFactory::newMeshFromArrays(), eve::Result< T >::success() , 以及 vertexCount.
◆ uploadMeshColored()
|
overridevirtual |
Upload a mesh with a tightly packed linear RGBA vertex-color stream.
- 返回
- Unsupported when a provider cannot retain vertex colors; no resource is created on failure.
Uploads mesh colored.
重载 eve::graphics::IMeshResourceFactory .
在文件 GraphicsMeshFactoryAdapter.cpp 第 28 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), indexCount, indices, mesh, eve::graphics::IResourceFactory::newMeshFromArraysColored(), eve::Result< T >::success() , 以及 vertexCount.
该类的文档由以下文件生成:
- src/modules/asset/graphics/EvpackGraphicsLoader.h
- src/modules/asset/graphics/GraphicsMeshFactoryAdapter.cpp
Public 成员函数 继承自