MemoryBarrier QML Type
用于设置内存屏障的类。更多...
| Import Statement: | import Qt3D.Render 2.12 |
| In C++: | QMemoryBarrier |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
详细说明
MemoryBarrier FrameGraph 节点用于在渲染过程的特定时间点设置特定的内存屏障。这是在 GPU 上正确同步绘制和计算命令所必需的。
该屏障定义了先前命令发出的内存操作的执行顺序。这意味着,如果命令1正在操作一个缓冲区,而该缓冲区将在后续的命令2中用作顶点属性缓冲区,则应将内存屏障放置在命令1之后,并为顶点属性缓冲区设置适当的屏障类型。
当在 FrameGraph 分支中发现 QMemoryBarrier 节点时,即使绘制或计算命令定义在分支更深处,该屏障也将在任何绘制或计算命令之前被强制执行。
关于 OpenGL 渲染,本页面提供了有关内存模型的更多信息
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.