MemoryBarrier QML Type
用于设置内存障碍的类。更多
Import Statement: | import Qt3D.Render 2.9 |
In C++: | QMemoryBarrier |
Inherits: | |
Status: | Deprecated |
详细说明
MemoryBarrier FrameGraph 节点用于在渲染的特定时间设置特定的内存障碍。这是在 GPU 上正确同步绘图和计算命令所必需的。
内存屏障定义了先前命令所发出的内存操作的顺序。这意味着,如果命令 1 正在操作一个缓冲区,而该缓冲区将在随后的命令 2 中用作顶点属性缓冲区,那么内存屏障应放在命令 1 之后,并为顶点属性缓冲区设置适当的屏障类型。
当在 FrameGraph 分支中发现 QMemoryBarrier 节点时,该屏障将在任何绘制或计算命令之前执行,即使这些命令是在分支的更深处定义的。
关于 OpenGL 渲染,本页提供了有关内存模型的更多信息
© 2025 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.