![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtGui More...
#include <qrhi.h>
Inheritance diagram for QRhiRenderTarget:
Collaboration diagram for QRhiRenderTarget:Public Member Functions | |
| virtual QSize | pixelSize () const =0 |
| virtual float | devicePixelRatio () const =0 |
| virtual int | sampleCount () const =0 |
| QRhiRenderPassDescriptor * | renderPassDescriptor () const |
| void | setRenderPassDescriptor (QRhiRenderPassDescriptor *desc) |
| Sets the QRhiRenderPassDescriptor desc for use with this render target. | |
Public Member Functions inherited from QRhiResource | |
| virtual | ~QRhiResource () |
| Destructor. | |
| virtual Type | resourceType () const =0 |
| virtual void | destroy ()=0 |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| void | deleteLater () |
| When called without a frame being recorded, this function is equivalent to deleting the object. | |
| QByteArray | name () const |
| void | setName (const QByteArray &name) |
| Sets a name for the object. | |
| quint64 | globalResourceId () const |
| QRhi * | rhi () const |
Protected Member Functions | |
| QRhiRenderTarget (QRhiImplementation *rhi) | |
Protected Member Functions inherited from QRhiResource | |
| QRhiResource (QRhiImplementation *rhi) | |
Protected Attributes | |
| QRhiRenderPassDescriptor * | m_renderPassDesc = nullptr |
Protected Attributes inherited from QRhiResource | |
| QRhiImplementation * | m_rhi = nullptr |
| quint64 | m_id |
| QByteArray | m_objectName |
Additional Inherited Members | |
Public Types inherited from QRhiResource | |
| enum | Type { Buffer , Texture , Sampler , RenderBuffer , RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings , GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer } |
| Specifies type of the resource. More... | |
\inmodule QtGui
Represents an onscreen (swapchain) or offscreen (texture) render target.
Applications do not create an instance of this class directly. Rather, it is the subclass QRhiTextureRenderTarget that is instantiable by clients of the API via \l{QRhi::newTextureRenderTarget()}{newTextureRenderTarget()}. The other subclass is QRhiSwapChainRenderTarget, which is the type QRhiSwapChain returns when calling \l{QRhiSwapChain::currentFrameRenderTarget()}{currentFrameRenderTarget()}.
|
protected |
|
pure virtual |
Implemented in QD3D11SwapChainRenderTarget, QD3D11TextureRenderTarget, QGles2SwapChainRenderTarget, QGles2TextureRenderTarget, QMetalSwapChainRenderTarget, QMetalTextureRenderTarget, QNullSwapChainRenderTarget, QNullTextureRenderTarget, QVkSwapChainRenderTarget, and QVkTextureRenderTarget.
|
pure virtual |
Valid only after create() has been called successfully. Until then the result is a default-constructed QSize.
With QRhiTextureRenderTarget the 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 what QRhiCommandBuffer::beginPass() does, and ensures that the returned size is always up-to-date.
Implemented in QD3D11SwapChainRenderTarget, QD3D11TextureRenderTarget, QGles2SwapChainRenderTarget, QGles2TextureRenderTarget, QMetalSwapChainRenderTarget, QMetalTextureRenderTarget, QNullSwapChainRenderTarget, QNullTextureRenderTarget, QVkSwapChainRenderTarget, and QVkTextureRenderTarget.
Referenced by QSSGRhiContextStats::beginRenderPass(), QQuickRenderTarget::fromRhiRenderTarget(), QQuickWindowPrivate::renderSceneGraph(), QRhiD3D11::setScissor(), QRhiMetal::setScissor(), QRhiVulkan::setScissor(), QRhiD3D11::setViewport(), QRhiMetal::setViewport(), and QRhiVulkan::setViewport().
Here is the caller graph for this function:
|
inline |
Definition at line 1141 of file qrhi.h.
Referenced by QSSGRhiQuadRenderer::recordRenderQuadPass(), and QQuickWindowPrivate::renderSceneGraph().
Here is the caller graph for this function:
|
pure virtual |
Implemented in QD3D11SwapChainRenderTarget, QD3D11TextureRenderTarget, QGles2SwapChainRenderTarget, QGles2TextureRenderTarget, QMetalSwapChainRenderTarget, QMetalTextureRenderTarget, QNullSwapChainRenderTarget, QNullTextureRenderTarget, QVkSwapChainRenderTarget, and QVkTextureRenderTarget.
Referenced by QQuickRenderTarget::fromRhiRenderTarget(), and QSGBatchRenderer::Renderer::prepareRenderPass().
Here is the caller graph for this function:
|
inline |
Sets the QRhiRenderPassDescriptor desc for use with this render target.
Definition at line 1142 of file qrhi.h.
References desc.
Referenced by QSSGRenderReflectionMap::addReflectionMapEntry(), QSSGRenderShadowMap::addShadowMapEntry(), QD3D11SwapChain::createOrResize(), QMetalSwapChain::createOrResize(), QNullSwapChain::createOrResize(), QVkSwapChain::createOrResize(), QGles2SwapChain::initSwapChainRenderTarget(), RenderHelpers::rhiPrepareAoTexture(), RenderHelpers::rhiPrepareDepthTexture(), RenderHelpers::rhiPrepareScreenTexture(), RenderHelpers::rhiRenderReflectionMap(), and QQuick3DSceneRenderer::synchronize().
Here is the caller graph for this function:
|
protected |
Definition at line 1146 of file qrhi.h.
Referenced by QD3D11TextureRenderTarget::create(), QGles2TextureRenderTarget::create(), QNullTextureRenderTarget::create(), and QVkTextureRenderTarget::create().