Real graphics-module provider for generated mesh publication. 更多...
#include <ArtifactProvider.h>
Public 成员函数 | |
| eve::Result< std::unique_ptr< eve::artifact::PreparedPublication > > | prepare (const eve::artifact::PublicationView &publication) override |
| Stage and copy the mesh leaf from a generated publication. | |
| eve::Result< eve::Value > | snapshotState () const override |
| Export resource identity, build keys, handles and CPU descriptors. | |
| eve::Result< void > | restoreState (const eve::Value &state) override |
| Replace resources from validated backend-neutral CPU descriptors. | |
| bool | emptyState () const noexcept override |
| Return whether the graphics registry has no committed resources. | |
| void | clearState () noexcept override |
| Clear provider state through the common restore-cleanup hook. | |
| const GraphicsArtifactResource * | find (eve::PersistentId id) const noexcept |
| Find a committed resource; the pointer is borrowed. @ownership Borrowed from this provider; callers must not delete or retain it. @nullable Null when no committed resource has the requested identity. @lifetime Until provider clear/restore/destruction or any later commit that reallocates the provider's record vector; callers must not cache it. @thread Graphics-provider owner thread; external synchronization is required. @reentrancy No callbacks are made. | |
| std::size_t | size () const noexcept |
| Return the number of committed graphics resources. | |
| std::uint64_t | checksum (eve::PersistentId id) const noexcept |
| Return a deterministic checksum of one resource's CPU descriptor. | |
| std::optional< GraphicsArtifactDescriptor > | descriptor (eve::PersistentId id) const |
| Return the backend-neutral descriptor for one resource. | |
| bool | isGpuResident (eve::PersistentId id) const noexcept |
| Return whether a resource was backed by the live Graphics upload boundary. | |
| void | clear () noexcept |
| Remove all resources and reset the local handle allocator. | |
| void | setPrepareFailure (bool enabled) noexcept |
| Inject a prepare failure for composition tests. | |
| void | bindGraphics (Graphics *graphics) noexcept |
| Bind a live Graphics resource factory without transferring ownership. | |
| void | detachGraphics (Graphics *graphics) noexcept |
| Detach the expected backend and release its provider-owned meshes. | |
Public 成员函数 继承自 eve::artifact::IGraphicsArtifactAdapter | |
| ~IGraphicsArtifactAdapter () override=default | |
| Releases IGraphicsArtifactAdapter resources. | |
Public 成员函数 继承自 eve::artifact::ProviderContract | |
| virtual | ~ProviderContract ()=default |
| Provider contract. | |
友元 | |
| class | GraphicsArtifactStage |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::artifact::IGraphicsArtifactAdapter | |
| static constexpr const char * | capabilityName = "eve.procgen.IGraphicsArtifactAdapter" |
详细描述
Real graphics-module provider for generated mesh publication.
The provider always owns the backend-neutral descriptor. When a live Graphics backend is bound, prepare also calls its normal newMeshFromArrays upload boundary; an unavailable/uninitialized backend is an explicit observable CPU capability-degraded path rather than a hidden mock.
在文件 ArtifactProvider.h 第 87 行定义.
成员函数说明
◆ bindGraphics()
|
noexcept |
Bind a live Graphics resource factory without transferring ownership.
在文件 ArtifactProvider.cpp 第 341 行定义.
◆ checksum()
|
noexcept |
Return a deterministic checksum of one resource's CPU descriptor.
在文件 ArtifactProvider.cpp 第 311 行定义.
引用了 resource.
◆ clear()
|
noexcept |
Remove all resources and reset the local handle allocator.
在文件 ArtifactProvider.cpp 第 334 行定义.
◆ clearState()
|
inlineoverridevirtualnoexcept |
Clear provider state through the common restore-cleanup hook.
重载 eve::artifact::ProviderContract .
在文件 ArtifactProvider.h 第 99 行定义.
◆ descriptor()
| std::optional< GraphicsArtifactDescriptor > eve::graphics::GraphicsArtifactProvider::descriptor | ( | eve::PersistentId | id | ) | const |
Return the backend-neutral descriptor for one resource.
在文件 ArtifactProvider.cpp 第 316 行定义.
◆ detachGraphics()
|
noexcept |
Detach the expected backend and release its provider-owned meshes.
在文件 ArtifactProvider.cpp 第 349 行定义.
◆ emptyState()
|
inlineoverridevirtualnoexcept |
Return whether the graphics registry has no committed resources.
重载 eve::artifact::ProviderContract .
在文件 ArtifactProvider.h 第 97 行定义.
◆ find()
|
noexcept |
Find a committed resource; the pointer is borrowed. @ownership Borrowed from this provider; callers must not delete or retain it. @nullable Null when no committed resource has the requested identity. @lifetime Until provider clear/restore/destruction or any later commit that reallocates the provider's record vector; callers must not cache it. @thread Graphics-provider owner thread; external synchronization is required. @reentrancy No callbacks are made.
在文件 ArtifactProvider.cpp 第 305 行定义.
被这些函数引用 descriptor() , 以及 prepare().
◆ isGpuResident()
|
noexcept |
Return whether a resource was backed by the live Graphics upload boundary.
在文件 ArtifactProvider.cpp 第 329 行定义.
引用了 resource.
◆ prepare()
|
overridevirtual |
Stage and copy the mesh leaf from a generated publication.
实现了 eve::artifact::ProviderContract.
在文件 ArtifactProvider.cpp 第 233 行定义.
引用了 eve::artifact::PublicationView::buildKey, eve::Conflict, eve::Diagnostic::error(), eve::Failed, find(), eve::artifact::PublicationView::id, eve::InvalidArgument, eve::RuntimeHandle< GraphicsArtifactHandleTag >::invalidIndex, eve::detail::Id128< Tag >::isNil(), mesh, eve::PreconditionViolation, eve::graphics::Graphics::releaseMesh() , 以及 resource.
◆ restoreState()
|
overridevirtual |
Replace resources from validated backend-neutral CPU descriptors.
重载 eve::artifact::ProviderContract .
在文件 ArtifactProvider.cpp 第 387 行定义.
引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::RuntimeHandle< GraphicsArtifactHandleTag >::fromPacked(), eve::Value::getIf(), index, member, eve::detail::Id128< Tag >::parse(), eve::ParseError, release, resource, resources, state, eve::Status::success(), eve::Result< T >::success(), u , 以及 eve::UnknownVersion.
◆ setPrepareFailure()
|
inlinenoexcept |
◆ size()
|
inlinenoexcept |
Return the number of committed graphics resources.
在文件 ArtifactProvider.h 第 112 行定义.
◆ snapshotState()
|
overridevirtual |
Export resource identity, build keys, handles and CPU descriptors.
重载 eve::artifact::ProviderContract .
在文件 ArtifactProvider.cpp 第 355 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), resource, resources, state , 以及 eve::Result< T >::success().
友元及相关函数文档
◆ GraphicsArtifactStage
|
friend |
在文件 ArtifactProvider.h 第 130 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/ArtifactProvider.h
- src/modules/graphics/ArtifactProvider.cpp
Public 成员函数 继承自