Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QNullRenderBuffer Struct Reference

#include <qrhinull_p.h>

Inheritance diagram for QNullRenderBuffer:
Collaboration diagram for QNullRenderBuffer:

Public Member Functions

 QNullRenderBuffer (QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
 ~QNullRenderBuffer ()
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 createFrom (NativeRenderBuffer src)
 Similar to create() except that no new native renderbuffer objects are created.
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
QRhirhi () const

Public Attributes

bool valid = false
uint generation = 0

Additional Inherited Members

Public Types inherited from QRhiRenderBuffer
enum  Type { DepthStencil , Color }
 Specifies the type of the renderbuffer. More...
enum  Flag { UsedWithSwapChainOnly = 1 << 0 }
 \variable QRhiRenderBuffer::NativeRenderBuffer::object More...
Public Types inherited from QRhiResource
enum  Type {
  Buffer , Texture , Sampler , RenderBuffer ,
  RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings ,
  GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer ,
  ShadingRateMap
}
 Specifies type of the resource. More...
Protected Member Functions inherited from QRhiRenderBuffer
 QRhiRenderBuffer (QRhiImplementation *rhi, Type type_, const QSize &pixelSize_, int sampleCount_, Flags flags_, QRhiTexture::Format backingFormatHint_)
Protected Member Functions inherited from QRhiResource
 QRhiResource (QRhiImplementation *rhi)
Protected Attributes inherited from QRhiRenderBuffer
Type m_type
QSize m_pixelSize
int m_sampleCount
Flags m_flags
QRhiTexture::Format m_backingFormatHint
Protected Attributes inherited from QRhiResource
QRhiImplementationm_rhi = nullptr
quint64 m_id
QByteArray m_objectName

Detailed Description

Definition at line 33 of file qrhinull_p.h.

Constructor & Destructor Documentation

◆ QNullRenderBuffer()

QNullRenderBuffer::QNullRenderBuffer ( QRhiImplementation * rhi,
Type type,
const QSize & pixelSize,
int sampleCount,
QRhiRenderBuffer::Flags flags,
QRhiTexture::Format backingFormatHint )

Definition at line 636 of file qrhinull.cpp.

References QNullRenderBuffer().

Referenced by QNullRenderBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~QNullRenderBuffer()

QNullRenderBuffer::~QNullRenderBuffer ( )

Definition at line 643 of file qrhinull.cpp.

References destroy().

Here is the call graph for this function:

Member Function Documentation

◆ backingFormat()

QRhiTexture::Format QNullRenderBuffer::backingFormat ( ) const
overridevirtual

Implements QRhiRenderBuffer.

Definition at line 671 of file qrhinull.cpp.

◆ create()

bool QNullRenderBuffer::create ( )
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.

Returns
true when successful, false when a graphics operation failed. Regardless of the return value, calling destroy() is always safe.

Implements QRhiRenderBuffer.

Definition at line 657 of file qrhinull.cpp.

References destroy(), and valid.

Here is the call graph for this function:

◆ destroy()

void QNullRenderBuffer::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.

Note
Resources referenced by commands for the current frame should not be released until the frame is submitted by QRhi::endFrame().

The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.

See also
deleteLater()

Implements QRhiResource.

Definition at line 648 of file qrhinull.cpp.

References valid.

Referenced by ~QNullRenderBuffer(), and create().

Here is the caller graph for this function:

Member Data Documentation

◆ generation

uint QNullRenderBuffer::generation = 0

Definition at line 44 of file qrhinull_p.h.

◆ valid

bool QNullRenderBuffer::valid = false

Definition at line 43 of file qrhinull_p.h.

Referenced by create(), and destroy().


The documentation for this struct was generated from the following files: