PySide6.Qt3DRender.Qt3DRender.QRenderTarget¶
- class QRenderTarget¶
QRenderTarget类封装了一个目标(通常是一个帧缓冲对象),渲染器可以渲染到其中。更多…概要¶
方法¶
def
__init__()def
addOutput()def
outputs()def
removeOutput()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
一个
QRenderTarget由QRenderTargetOutput对象组成,这些对象指定了渲染目标正在渲染的缓冲区。用户可以通过将多个纹理附加到不同的附加点来指定MRT(多重渲染目标)。如果用户尝试将多个纹理附加到同一个附加点,结果是未定义的。在渲染时,仅使用QRenderTargetSelector中指定的绘制缓冲区。- __init__([parent=None])¶
- Parameters:
parent –
QNode
构造函数使用指定的
parent创建一个新的QRenderTarget实例。- addOutput(output)¶
- Parameters:
输出 –
QRenderTargetOutput
通过
output添加选定的输出。- outputs()¶
- Return type:
返回所选的输出。
- removeOutput(output)¶
- Parameters:
输出 –
QRenderTargetOutput
通过
output移除选定的输出。