![]() |
Qt 6.x
The Qt SDK
|
#include <qrhid3d11_p.h>
Inheritance diagram for QD3D11RenderBuffer:
Collaboration diagram for QD3D11RenderBuffer:Public Member Functions | |
| QD3D11RenderBuffer (QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) | |
| ~QD3D11RenderBuffer () | |
| void | destroy () override |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| bool | create () override |
| Creates the corresponding native graphics resources. | |
| QRhiTexture::Format | backingFormat () const override |
Public Member Functions inherited from QRhiRenderBuffer | |
| QRhiResource::Type | resourceType () const override |
| Type | type () const |
| void | setType (Type t) |
| Sets the type to t. | |
| QSize | pixelSize () const |
| void | setPixelSize (const QSize &sz) |
| Sets the size (in pixels) to sz. | |
| int | sampleCount () const |
| void | setSampleCount (int s) |
| Sets the sample count to s. | |
| Flags | flags () const |
| void | setFlags (Flags f) |
| Sets the flags to f. | |
| virtual bool | create ()=0 |
| Creates the corresponding native graphics resources. | |
| virtual bool | createFrom (NativeRenderBuffer src) |
| Similar to create() except that no new native renderbuffer objects are created. | |
| virtual QRhiTexture::Format | backingFormat () const =0 |
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 |
Public Attributes | |
| ID3D11Texture2D * | tex = nullptr |
| ID3D11DepthStencilView * | dsv = nullptr |
| ID3D11RenderTargetView * | rtv = nullptr |
| DXGI_FORMAT | dxgiFormat |
| DXGI_SAMPLE_DESC | sampleDesc |
| uint | generation = 0 |
Friends | |
| class | QRhiD3D11 |
Definition at line 50 of file qrhid3d11_p.h.
| QD3D11RenderBuffer::QD3D11RenderBuffer | ( | QRhiImplementation * | rhi, |
| Type | type, | ||
| const QSize & | pixelSize, | ||
| int | sampleCount, | ||
| QRhiRenderBuffer::Flags | flags, | ||
| QRhiTexture::Format | backingFormatHint | ||
| ) |
Definition at line 2988 of file qrhid3d11.cpp.
| QD3D11RenderBuffer::~QD3D11RenderBuffer | ( | ) |
Definition at line 2995 of file qrhid3d11.cpp.
References destroy().
Here is the call graph for this function:
|
overridevirtual |
Implements QRhiRenderBuffer.
Definition at line 3095 of file qrhid3d11.cpp.
References QRhiRenderBuffer::Color, QRhiRenderBuffer::m_backingFormatHint, QRhiRenderBuffer::m_type, QRhiTexture::RGBA8, and QRhiTexture::UnknownFormat.
|
overridevirtual |
Creates the corresponding native graphics resources.
If there are already resources present due to an earlier create() with no corresponding destroy(), then destroy() is called implicitly first.
true when successful, false when a graphics operation failed. Regardless of the return value, calling destroy() is always safe. Implements QRhiRenderBuffer.
Definition at line 3023 of file qrhid3d11.cpp.
References QRhiRenderBuffer::Color, QByteArray::constData(), QRhiRenderBuffer::DepthStencil, desc, destroy(), dsv, dxgiFormat, generation, QSize::height(), QByteArray::isEmpty(), QSize::isEmpty(), QRhiRenderBuffer::m_backingFormatHint, QRhiResource::m_objectName, QRhiRenderBuffer::m_pixelSize, QRhiRenderBuffer::m_sampleCount, QRhiRenderBuffer::m_type, qPrintable, QRHI_RES_RHI, qWarning, rtv, sampleDesc, QByteArray::size(), tex, toD3DTextureFormat(), QRhiTexture::UnknownFormat, and QSize::width().
Here is the call graph for this function:
|
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 3000 of file qrhid3d11.cpp.
References dsv, QRHI_RES_RHI, rtv, and tex.
Referenced by ~QD3D11RenderBuffer(), and create().
Here is the caller graph for this function:
|
friend |
Definition at line 66 of file qrhid3d11_p.h.
| ID3D11DepthStencilView* QD3D11RenderBuffer::dsv = nullptr |
Definition at line 61 of file qrhid3d11_p.h.
Referenced by QRhiD3D11::beginFrame(), create(), QD3D11TextureRenderTarget::create(), and destroy().
| DXGI_FORMAT QD3D11RenderBuffer::dxgiFormat |
Definition at line 63 of file qrhid3d11_p.h.
Referenced by create(), and QRhiD3D11::endPass().
| uint QD3D11RenderBuffer::generation = 0 |
Definition at line 65 of file qrhid3d11_p.h.
Referenced by create().
| ID3D11RenderTargetView* QD3D11RenderBuffer::rtv = nullptr |
Definition at line 62 of file qrhid3d11_p.h.
Referenced by create(), QD3D11TextureRenderTarget::create(), and destroy().
| DXGI_SAMPLE_DESC QD3D11RenderBuffer::sampleDesc |
Definition at line 64 of file qrhid3d11_p.h.
Referenced by create(), and QD3D11TextureRenderTarget::create().
| ID3D11Texture2D* QD3D11RenderBuffer::tex = nullptr |
Definition at line 60 of file qrhid3d11_p.h.
Referenced by create(), destroy(), and QRhiD3D11::endPass().