PySide6.QtGui.QRhiRenderTarget¶
- class QRhiRenderTarget¶
Represents an onscreen (swapchain) or offscreen (texture) render target.
Details
Applications do not create an instance of this class directly. Rather, it is the subclass
QRhiTextureRenderTargetthat is instantiable by clients of the API vianewTextureRenderTarget(). The other subclass isQRhiSwapChainRenderTarget, which is the typeQRhiSwapChainreturns when callingcurrentFrameRenderTarget().Note
This is a RHI API with limited compatibility guarantees, see
QRhifor details.Inherited by:
QRhiTextureRenderTarget,QRhiSwapChainRenderTargetAdded in version 6.6.
Synopsis¶
Methods¶
Virtual methods¶
def
pixelSize()def
sampleCount()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- PySide6.QtGui.QRhiRenderTarget.m_renderPassDesc¶
- abstract devicePixelRatio()¶
- Return type:
float
Returns the device pixel ratio. For
QRhiTextureRenderTargetthis is always 1. For targets retrieved from aQRhiSwapChainthe value reflects thedevice pixel ratioof the targetedQWindow.Returns the size in pixels.
Valid only after create() has been called successfully. Until then the result is a default-constructed QSize.
With
QRhiTextureRenderTargetthe returned size is the size of the associated attachments at the time of create(), in practice the size of the first color attachment, or the depth/stencil buffer if there are no color attachments. If the associated textures or renderbuffers are resized and rebuilt afterwards, then pixelSize() performs an implicit call to create() in order to rebuild the underlying data structures. This implicit check is similar to whatbeginPass()does, and ensures that the returned size is always up-to-date.- renderPassDescriptor()¶
- Return type:
Returns the associated
QRhiRenderPassDescriptor.See also
- abstract sampleCount()¶
- Return type:
int
Returns the sample count or 1 if multisample antialiasing is not relevant for this render target.
- setRenderPassDescriptor(desc)¶
- Parameters:
desc –
QRhiRenderPassDescriptor
Sets the
QRhiRenderPassDescriptordescfor use with this render target.See also