Render-thread adapter from stylize runtime state to Graphics mesh draws. 更多...
#include <MeshEffectRenderer.h>
Public 成员函数 | |
| MeshEffectRenderer (graphics::Graphics &graphics) noexcept | |
| Bind this adapter to one Graphics owner for its entire lifetime. | |
| MeshEffectRenderer (const MeshEffectRenderer &)=delete | |
| MeshEffectRenderer & | operator= (const MeshEffectRenderer &)=delete |
| eve::Result< MeshEffectSubmitStatus > | submitOverlay (MeshEffectInstance &effect, const MeshEffectDrawSource &source) |
| Draw a second-pass effect over a resolved source mesh. | |
| eve::Result< MeshEffectSubmitStatus > | submitTrail (MeshEffectInstance &effect, const TrailMeshSnapshot &snapshot, const glm::mat4 &model=glm::mat4(1.f), const graphics::Color &tint=graphics::Color(1.f)) |
| Upload and draw one dynamic ribbon using an active mesh effect. | |
| eve::Result< MeshEffectSubmitStatus > | submitParticle (MeshEffectInstance &effect, const MeshParticleDrawSource &source) |
| Draw one simulated mesh particle through an active mesh-effect style. | |
| eve::Result< MeshVfxSubmissionReport > | submitQueue (const MeshVfxRenderQueue &queue, std::span< const MeshVfxRendererCommand > commands) |
| Resolve and submit a complete LOD-planned render queue. | |
| MeshVfxSubmitStatus | beginBatch (const MeshVfxBatchKey &key) override |
| Begin one GPU-state batch; intended for MeshVfxBatchExecutor. | |
| MeshVfxSubmitStatus | submitDraw (const MeshVfxBatchedDraw &draw) override |
| Submit one resolved draw in the active batch. | |
| MeshVfxSubmitStatus | endBatch () override |
| End the active GPU-state batch. | |
| graphics::Mesh * | trailMesh () const noexcept |
| Return the backend-owned dynamic ribbon mesh, or nullptr before first upload. | |
Public 成员函数 继承自 eve::stylize::IMeshVfxBatchSink | |
| virtual | ~IMeshVfxBatchSink ()=default |
| Releases IMeshVfxBatchSink resources. | |
详细描述
Render-thread adapter from stylize runtime state to Graphics mesh draws.
Graphics owns every mesh and shader created by this adapter. The adapter retains borrowed backend handles across frames, so its Graphics owner must outlive it and the adapter must only be used with that same owner. Destruction does not perform fallible GPU work; resources remain owned by Graphics and are reclaimed at Graphics shutdown.
在文件 MeshEffectRenderer.h 第 113 行定义.
构造及析构函数说明
◆ MeshEffectRenderer() [1/2]
|
explicitnoexcept |
Bind this adapter to one Graphics owner for its entire lifetime.
在文件 MeshEffectRenderer.cpp 第 109 行定义.
◆ MeshEffectRenderer() [2/2]
|
delete |
成员函数说明
◆ beginBatch()
|
overridevirtual |
Begin one GPU-state batch; intended for MeshVfxBatchExecutor.
实现了 eve::stylize::IMeshVfxBatchSink.
在文件 MeshEffectRenderer.cpp 第 271 行定义.
引用了 eve::stylize::Accepted, eve::stylize::Alpha, blend, eve::stylize::Failed, key, eve::graphics::Graphics::setMesh3DSurface() , 以及 eve::graphics::Transparent.
◆ endBatch()
|
overridevirtual |
End the active GPU-state batch.
实现了 eve::stylize::IMeshVfxBatchSink.
在文件 MeshEffectRenderer.cpp 第 304 行定义.
引用了 eve::stylize::Accepted , 以及 eve::stylize::Failed.
◆ operator=()
|
delete |
◆ submitDraw()
|
overridevirtual |
Submit one resolved draw in the active batch.
实现了 eve::stylize::IMeshVfxBatchSink.
在文件 MeshEffectRenderer.cpp 第 285 行定义.
引用了 eve::stylize::Accepted, draw, eve::stylize::Drawn, eve::stylize::Failed, found, eve::Result< T >::ok(), eve::stylize::MeshVfxRendererCommand::Particle, eve::stylize::Skipped, submitOverlay(), submitParticle(), submitTrail(), eve::stylize::MeshVfxRendererCommand::Trail , 以及 eve::Result< T >::value().
◆ submitOverlay()
| eve::Result< MeshEffectSubmitStatus > eve::stylize::MeshEffectRenderer::submitOverlay | ( | MeshEffectInstance & | effect, |
| const MeshEffectDrawSource & | source | ||
| ) |
Draw a second-pass effect over a resolved source mesh.
- 参数
-
effect Active effect whose target must equal source.target. source Immediate borrowed mesh/material/transform inputs.
- 返回
- Drawn, inactive, or a structured stale/invalid failure. @thread Render-thread affine; requires an open 3D frame.
在文件 MeshEffectRenderer.cpp 第 142 行定义.
引用了 eve::graphics::Graphics::drawMeshShader(), eve::stylize::Drawn, effect, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::PreconditionViolation, eve::graphics::Graphics::setMesh3DSurface(), eve::stylize::SkippedInactive, source, eve::StaleHandle, eve::Result< T >::success(), tint , 以及 eve::graphics::Transparent.
被这些函数引用 submitDraw().
◆ submitParticle()
| eve::Result< MeshEffectSubmitStatus > eve::stylize::MeshEffectRenderer::submitParticle | ( | MeshEffectInstance & | effect, |
| const MeshParticleDrawSource & | source | ||
| ) |
Draw one simulated mesh particle through an active mesh-effect style.
- 参数
-
effect Shared active effect style; no character target binding is required. source Immediate particle transform and borrowed mesh/material handles.
- 返回
- Drawn, inactive, or a structured invalid-source failure. @thread Render-thread affine; requires an open 3D frame.
在文件 MeshEffectRenderer.cpp 第 221 行定义.
引用了 eve::graphics::Graphics::drawMeshShader(), eve::stylize::Drawn, effect, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::graphics::Graphics::setMesh3DSurface(), eve::stylize::SkippedInactive, source, eve::Result< T >::success(), tint , 以及 eve::graphics::Transparent.
被这些函数引用 submitDraw().
◆ submitQueue()
| eve::Result< MeshVfxSubmissionReport > eve::stylize::MeshEffectRenderer::submitQueue | ( | const MeshVfxRenderQueue & | queue, |
| std::span< const MeshVfxRendererCommand > | commands | ||
| ) |
Resolve and submit a complete LOD-planned render queue.
- 参数
-
queue Ordered batches produced for this frame. commands Owning/immediate command payloads keyed by stableInstanceId.
- 返回
- Submission report or invalid/reentrant command failure. @thread Render-thread affine; requires an open 3D frame. @reentrancy Must not be called recursively on the same renderer.
在文件 MeshEffectRenderer.cpp 第 246 行定义.
引用了 commands, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::PreconditionViolation, eve::stylize::MeshVfxBatchExecutor::submit() , 以及 eve::Result< T >::success().
◆ submitTrail()
| eve::Result< MeshEffectSubmitStatus > eve::stylize::MeshEffectRenderer::submitTrail | ( | MeshEffectInstance & | effect, |
| const TrailMeshSnapshot & | snapshot, | ||
| const glm::mat4 & | model = glm::mat4(1.f), |
||
| const graphics::Color & | tint = graphics::Color(1.f) |
||
| ) |
Upload and draw one dynamic ribbon using an active mesh effect.
- 参数
-
effect Active mesh effect, normally using the slash style. snapshot Owning CPU geometry snapshot; it is not retained. model Model transform; use identity for world-space trail samples. tint Per-draw color multiplied by the lifecycle envelope.
- 返回
- Drawn, empty/inactive, or a structured upload failure. @thread Render-thread affine; requires an open 3D frame.
在文件 MeshEffectRenderer.cpp 第 175 行定义.
引用了 eve::graphics::Graphics::drawMeshShader(), eve::stylize::Drawn, effect, error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::stylize::TrailUploadData::indices, eve::stylize::TrailMeshSnapshot::indices, model, eve::graphics::Graphics::newMeshFromArrays(), eve::stylize::TrailUploadData::normals, eve::stylize::TrailUploadData::positions, eve::stylize::prepareTrailUpload(), eve::graphics::Graphics::setMesh3DSurface(), eve::stylize::SkippedEmpty, eve::stylize::SkippedInactive, eve::Result< T >::success(), tint, eve::graphics::Transparent, eve::Unsupported, eve::graphics::Graphics::updateMeshVertices(), eve::stylize::TrailUploadData::uvs , 以及 eve::stylize::TrailMeshSnapshot::vertices.
被这些函数引用 eve::stylize::BeamSkillEffect::submit() , 以及 submitDraw().
◆ trailMesh()
|
inlinenoexcept |
Return the backend-owned dynamic ribbon mesh, or nullptr before first upload.
在文件 MeshEffectRenderer.h 第 175 行定义.
该类的文档由以下文件生成:
- src/modules/stylize/MeshEffectRenderer.h
- src/modules/stylize/MeshEffectRenderer.cpp
Public 成员函数 继承自