ForwardRenderer QML Type
ForwardRenderer 提供了一个正向渲染器的默认FrameGraph实现。更多内容...
| Import Statement: | import Qt3D.Extras 2.12 |
| In C++: | QForwardRenderer |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- buffersToClear : color
- camera : Entity
- clearColor : color
- externalRenderTargetSize : size
- frustumCulling : bool
- gamma : real
- showDebugOverlay : bool
- surface : QtObject
- viewportRect : rect
详细说明
前向渲染是 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
如果为真,将在场景上渲染一个调试叠加层。该叠加层将显示有关运行时渲染状态的详细信息,并允许用户开启或关闭日志记录等功能。
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.