PySide6.Qt3DRender.Qt3DRender.QBlitFramebuffer

class QBlitFramebuffer

FrameGraph节点用于将像素值的矩形从一个渲染目标区域传输到另一个区域。更多

PySide6.Qt3DRender.Qt3DRender.QBlitFramebuffer 的继承图

概要

属性

方法

信号

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

此节点将glBlitFrameBuffer或等效项插入命令流中。这提供了一种比绘制纹理四边形更高效的方法,用于在由QRenderTarget包装的纹理或表面后缓冲之间复制矩形。它还支持使用指定的插值方法进行缩放。

注意

在实践中,QBlitFramebuffer 节点通常会与 QNoDraw 结合使用,因为 blit 操作不应涉及为任何实体发出绘制调用。

class InterpolationMethod

指定如果图像被拉伸时应用的插值方法。

常量

描述

Qt3DRender.QBlitFramebuffer.Nearest

最近邻插值。

Qt3DRender.QBlitFramebuffer.Linear

线性插值。

注意

当使用from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。

property destinationᅟ: QRenderTarget

指定目标渲染目标。如果未设置,则假定目标为默认帧缓冲区(即当前表面的后缓冲区),如果有的话。

注意

源和目标不能引用相同的渲染目标。

Access functions:
property destinationAttachmentPointᅟ: Qt3DRender.QRenderTargetOutput.AttachmentPoint

指定目标附着点。

Access functions:
property destinationRectᅟ: QRectF

指定目标矩形。坐标假定遵循正常的Qt坐标系,意味着Y从上到下运行。

Access functions:
property interpolationMethodᅟ: Qt3DRender.QBlitFramebuffer.InterpolationMethod
Access functions:
property sourceᅟ: QRenderTarget

指定源渲染目标。如果未设置,则假定源为默认帧缓冲区(即当前表面的后缓冲区),如果有的话。

注意

源和目标不能引用相同的渲染目标。

Access functions:
property sourceAttachmentPointᅟ: Qt3DRender.QRenderTargetOutput.AttachmentPoint

指定源附加点。

Access functions:
property sourceRectᅟ: QRectF

指定源矩形。坐标假定遵循正常的Qt坐标系,意味着Y从上到下运行。

Access functions:
__init__([parent=None])
Parameters:

parentQNode

使用给定的parent构造一个新的QBlitFramebuffer

destination()
Return type:

QRenderTarget

返回目标渲染目标。

另请参阅

setDestination()

属性 destinationᅟ 的获取器。

destinationAttachmentPoint()
Return type:

AttachmentPoint

返回目标连接点。

另请参阅

setDestinationAttachmentPoint()

属性 destinationAttachmentPointᅟ 的获取器。

destinationAttachmentPointChanged()

属性 destinationAttachmentPointᅟ 的通知信号。

destinationChanged()

属性 destinationᅟ 的通知信号。

destinationRect()
Return type:

QRectF

返回目标矩形。

另请参阅

setDestinationRect()

属性 destinationRectᅟ 的获取器。

destinationRectChanged()

属性 destinationRectᅟ 的通知信号。

interpolationMethod()
Return type:

InterpolationMethod

返回插值方法。

另请参阅

setInterpolationMethod()

属性 interpolationMethodᅟ 的获取器。

interpolationMethodChanged()

属性 interpolationMethodᅟ 的通知信号。

setDestination(destination)
Parameters:

目标QRenderTarget

设置目标渲染目标。默认值为 nullptr,在这种情况下,如果存在默认帧缓冲区(即当前表面的后缓冲区),则假定目标为默认帧缓冲区。

注意

源和目标不能引用相同的渲染目标。

注意

与其他节点一样,当没有设置父节点时,destination会自动成为QBlitFramebuffer实例的子节点。生命周期也会被跟踪,这意味着如果当前设置的destination被销毁,目标将恢复为nullptr。

另请参阅

destination()

属性 destinationᅟ 的设置器。

setDestinationAttachmentPoint(destinationAttachmentPoint)
Parameters:

destinationAttachmentPointAttachmentPoint

设置destinationAttachmentPoint。默认为Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0。

另请参阅

destinationAttachmentPoint()

属性 destinationAttachmentPointᅟ 的设置器。

setDestinationRect(destinationRect)
Parameters:

destinationRectQRectF

将目标矩形设置为outputRect。坐标假定遵循正常的Qt坐标系,意味着Y从上到下运行。

另请参阅

destinationRect()

属性 destinationRectᅟ 的设置器。

setInterpolationMethod(interpolationMethod)
Parameters:

interpolationMethodInterpolationMethod

设置如果图像被拉伸时应用的interpolationMethod。默认为Linear。

另请参阅

interpolationMethod()

属性 interpolationMethodᅟ 的设置器。

setSource(source)
Parameters:

来源QRenderTarget

设置源渲染目标。默认值为nullptr,在这种情况下,假设源是默认的帧缓冲区(即当前表面的后缓冲区),如果有的话。

注意

源和目标不能引用相同的渲染目标。

注意

与其他节点一样,当没有设置父节点时,source会自动成为QBlitFramebuffer实例的子节点。生命周期也会被跟踪,这意味着如果当前设置的source被销毁,源将恢复为nullptr。

另请参阅

source()

属性 sourceᅟ 的设置器。

setSourceAttachmentPoint(sourceAttachmentPoint)
Parameters:

sourceAttachmentPointAttachmentPoint

设置sourceAttachmentPoint。默认为Qt3DRender::QRenderTargetOutput::AttachmentPoint::Color0。

另请参阅

sourceAttachmentPoint()

属性 sourceAttachmentPointᅟ 的设置器。

setSourceRect(sourceRect)
Parameters:

sourceRectQRectF

将源矩形设置为inputRect。坐标假定遵循正常的Qt坐标系,意味着Y从上到下运行。

另请参阅

sourceRect()

属性 sourceRectᅟ 的设置器。

source()
Return type:

QRenderTarget

返回源渲染目标。

另请参阅

setSource()

属性 sourceᅟ 的获取器。

sourceAttachmentPoint()
Return type:

AttachmentPoint

返回源附加点。

另请参阅

setSourceAttachmentPoint()

属性 sourceAttachmentPointᅟ 的获取器。

sourceAttachmentPointChanged()

属性 sourceAttachmentPointᅟ 的通知信号。

sourceChanged()

属性 sourceᅟ 的通知信号。

sourceRect()
Return type:

QRectF

返回源矩形。

另请参阅

setSourceRect()

属性 sourceRectᅟ 的获取器。

sourceRectChanged()

属性 sourceRectᅟ 的通知信号。