NoDraw QML Type
当 FrameGraph 分支中出现 NoDraw 节点时,渲染器将无法渲染任何基元。更多
Import Statement: | import Qt3D.Render 2.9 |
In C++: | QNoDraw |
Inherits: | |
Status: | Deprecated |
详细说明
当 FrameGraph 需要设置一些渲染状态或清除一些缓冲区而不需要绘制任何网格时,应使用 NoDraw。其效果与Qt3DRender::QRenderPassFilter 的效果相同,该 与场景中任何可用的Qt3DRender::QRenderPass 实例都不匹配,而不会产生实际执行过滤的开销成本。
禁用 NoDraw 节点时,不会阻止渲染场景。因此,切换启用属性是使 NoDraw 处于活动或非活动状态的一种方法。
NoDraw 通常作为ClearBuffers 节点的子节点使用,以防止在多次渲染时绘制场景。
Viewport { CameraSelector { ClearBuffers { buffers: ClearBuffers.ColorDepthBuffer NoDraw { } // Prevents from drawing anything } RenderPassFilter { ... } RenderPassFilter { ... } } }
© 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.