Qt3DRender::QRenderTarget Class
class Qt3DRender::QRenderTargetQRenderTarget 类封装了一个目标(通常是一个帧缓冲区对象),渲染器可以将其内容渲染到该目标中。更多内容...
| 头文件: | #include <qrendertarget.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 在 QML 中: | RenderTarget |
| 继承自: | Qt3DCore::QComponent |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共函数
| QRenderTarget(Qt3DCore::QNode *parent = nullptr) | |
| void | addOutput(Qt3DRender::QRenderTargetOutput *output) |
| QList<Qt3DRender::QRenderTargetOutput *> | outputs() const |
| void | removeOutput(Qt3DRender::QRenderTargetOutput *output) |
详细说明
Qt3DRender::QRenderTarget 由Qt3DRender::QRenderTargetOutput 对象组成,这些对象指定了渲染目标的渲染缓冲区。用户可以通过将多个纹理附加到不同的附加点来指定 MRT(多渲染目标)。如果用户尝试将多个纹理附加到同一个附加点,则结果未定义。 在渲染时,仅使用Qt3DRender::QRenderTargetSelector 中指定的绘制缓冲区。
成员函数文档
[explicit] QRenderTarget::QRenderTarget(Qt3DCore::QNode *parent = nullptr)
该构造函数会使用指定的parent 创建一个新的QRenderTarget::QRenderTarget 实例。
void QRenderTarget::addOutput(Qt3DRender::QRenderTargetOutput *output)
通过output 添加选定的输出。
QList<Qt3DRender::QRenderTargetOutput *> QRenderTarget::outputs() const
返回所选的输出。
void QRenderTarget::removeOutput(Qt3DRender::QRenderTargetOutput *output)
通过output 移除选定的输出。
© 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.