在本页

ForwardRenderer QML Type

ForwardRenderer 提供了前向呈现器的默认FrameGraph实现。更多

Import Statement: import Qt3D.Extras 2.11
In C++: QForwardRenderer
Status: Deprecated

属性

详细说明

前向渲染是 OpenGL 传统上使用的渲染方式。它每次直接向后缓冲区渲染一个对象,并在渲染过程中为每个对象着色。

ForwardRenderer 是一个单叶FrameGraph树,其中包含一个视口(Viewport)、一个CameraSelector 和一个ClearBuffers 。ForwardRenderer 有一个默认的需求过滤键,其名称为 "renderingStyle",值为 "forward"。如果需要过滤技术,应根据该过滤键进行过滤。

默认情况下,视口会占据整个屏幕,透明色为白色。此外,还启用了渲染剔除功能。

属性文档

buffersToClear : color

保存要清除的当前缓冲区。默认值为 ColorDepthBuffer

camera : Entity

保存当前用于渲染场景的摄像机实体。

注: 摄像机是一个以CameraLens 为组件的实体。

clearColor : color

保存场景的当前净色。在渲染前,帧缓冲区会被初始化为清除色。

externalRenderTargetSize : size

包含外部呈现目标的大小。当渲染不以窗口表面为目标(如surface 中所设置)时,外部渲染目标就与之相关。

frustumCulling : bool

表示渲染器是否对场景应用了挫边剔除。

gamma : real

保存渲染器应用于场景的伽玛值。

showDebugOverlay : bool

如果为 "true",则会在场景上渲染调试覆盖层。它将显示运行时渲染状态的详细信息,允许用户打开或关闭日志记录等。

surface : QtObject

保存当前的渲染表面。

viewportRect : rect

保存当前的规范化视口矩形。

© 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.