Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\inmodule QtGui More...
#include <qrhi.h>
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.
Referenced by Item2DPass::renderPrep().
|
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(), ExampleRhiItemRenderer::initialize(), ExampleRhiItemRenderer::render(), Item2DPass::renderPrep(), QRhiD3D11::setScissor(), QRhiMetal::setScissor(), QRhiVulkan::setScissor(), QRhiD3D11::setViewport(), QRhiMetal::setViewport(), and QRhiVulkan::setViewport().
|
inline |
Definition at line 1164 of file qrhi.h.
Referenced by ExampleRhiWidget::initialize(), ExampleRhiItemRenderer::initialize(), and QSSGRhiQuadRenderer::recordRenderQuadPass().
|
pure virtual |
Implemented in QD3D11SwapChainRenderTarget, QD3D11TextureRenderTarget, QGles2SwapChainRenderTarget, QGles2TextureRenderTarget, QMetalSwapChainRenderTarget, QMetalTextureRenderTarget, QNullSwapChainRenderTarget, QNullTextureRenderTarget, QVkSwapChainRenderTarget, and QVkTextureRenderTarget.
Referenced by QQuickRenderTarget::fromRhiRenderTarget(), and QSGBatchRenderer::Renderer::prepareRenderPass().
|
inline |
Sets the QRhiRenderPassDescriptor desc for use with this render target.
Definition at line 1165 of file qrhi.h.
Referenced by QSSGRenderReflectionMap::addReflectionMapEntry(), QSSGRenderShadowMap::addShadowMapEntry(), QD3D11SwapChain::createOrResize(), QMetalSwapChain::createOrResize(), QNullSwapChain::createOrResize(), QVkSwapChain::createOrResize(), QGles2SwapChain::initSwapChainRenderTarget(), QRhiWidgetPrivate::invokeInitialize(), RenderHelpers::rhiRenderReflectionMap(), and QQuick3DSceneRenderer::synchronize().
|
protected |
Definition at line 1169 of file qrhi.h.
Referenced by QD3D11TextureRenderTarget::create(), QGles2TextureRenderTarget::create(), QNullTextureRenderTarget::create(), and QVkTextureRenderTarget::create().