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>.
|
#include <qrhinull_p.h>
Public Member Functions | |
QNullSwapChainRenderTarget (QRhiImplementation *rhi, QRhiSwapChain *swapchain) | |
~QNullSwapChainRenderTarget () | |
void | destroy () override |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
QSize | pixelSize () const override |
float | devicePixelRatio () const override |
int | sampleCount () const override |
Public Member Functions inherited from QRhiSwapChainRenderTarget | |
QRhiResource::Type | resourceType () const override |
QRhiSwapChain * | swapChain () const |
Public Member Functions inherited from QRhiRenderTarget | |
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. | |
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 |
Public Attributes | |
QNullRenderTargetData | d |
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... | |
Protected Member Functions inherited from QRhiSwapChainRenderTarget | |
QRhiSwapChainRenderTarget (QRhiImplementation *rhi, QRhiSwapChain *swapchain_) | |
Protected Member Functions inherited from QRhiRenderTarget | |
QRhiRenderTarget (QRhiImplementation *rhi) | |
Protected Member Functions inherited from QRhiResource | |
QRhiResource (QRhiImplementation *rhi) | |
Protected Attributes inherited from QRhiSwapChainRenderTarget | |
QRhiSwapChain * | m_swapchain |
Protected Attributes inherited from QRhiRenderTarget | |
QRhiRenderPassDescriptor * | m_renderPassDesc = nullptr |
Protected Attributes inherited from QRhiResource | |
QRhiImplementation * | m_rhi = nullptr |
quint64 | m_id |
QByteArray | m_objectName |
Definition at line 90 of file qrhinull_p.h.
QNullSwapChainRenderTarget::QNullSwapChainRenderTarget | ( | QRhiImplementation * | rhi, |
QRhiSwapChain * | swapchain ) |
Definition at line 780 of file qrhinull.cpp.
QNullSwapChainRenderTarget::~QNullSwapChainRenderTarget | ( | ) |
Definition at line 786 of file qrhinull.cpp.
References destroy().
|
overridevirtual |
Releases (or requests deferred releasing of) the underlying native graphics resources.
Safe to call multiple times, subsequent invocations will be a no-op then.
Once destroy() is called, the QRhiResource instance can be reused, by calling create()
again. That will then result in creating new native graphics resources underneath.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 791 of file qrhinull.cpp.
Referenced by ~QNullSwapChainRenderTarget().
|
overridevirtual |
Implements QRhiRenderTarget.
Definition at line 800 of file qrhinull.cpp.
References d, and QNullRenderTargetData::dpr.
|
overridevirtual |
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.
Implements QRhiRenderTarget.
Definition at line 795 of file qrhinull.cpp.
References d, and QNullRenderTargetData::pixelSize.
|
overridevirtual |
Implements QRhiRenderTarget.
Definition at line 805 of file qrhinull.cpp.
QNullRenderTargetData QNullSwapChainRenderTarget::d |
Definition at line 100 of file qrhinull_p.h.
Referenced by QNullSwapChain::createOrResize(), devicePixelRatio(), and pixelSize().