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>.
Loading...
Searching...
No Matches
QGles2ShaderResourceBindings Struct Reference

#include <qrhigles2_p.h>

+ Inheritance diagram for QGles2ShaderResourceBindings:
+ Collaboration diagram for QGles2ShaderResourceBindings:

Public Member Functions

 QGles2ShaderResourceBindings (QRhiImplementation *rhi)
 
 ~QGles2ShaderResourceBindings ()
 
void destroy () override
 Releases (or requests deferred releasing of) the underlying native graphics resources.
 
bool create () override
 
void updateResources (UpdateFlags flags) override
 
- Public Member Functions inherited from QRhiShaderResourceBindings
QRhiResource::Type resourceType () const override
 
void setBindings (std::initializer_list< QRhiShaderResourceBinding > list)
 Sets the list of bindings.
 
template<typename InputIterator >
void setBindings (InputIterator first, InputIterator last)
 Sets the list of bindings from the iterators first and last.
 
const QRhiShaderResourceBindingcbeginBindings () const
 
const QRhiShaderResourceBindingcendBindings () const
 
const QRhiShaderResourceBindingbindingAt (qsizetype index) const
 
qsizetype bindingCount () const
 
bool isLayoutCompatible (const QRhiShaderResourceBindings *other) const
 
QVector< quint32serializedLayoutDescription () const
 
- 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 hasDynamicOffset = false
 
uint generation = 0
 

Friends

class QRhiGles2
 

Additional Inherited Members

- Public Types inherited from QRhiShaderResourceBindings
enum  UpdateFlag { BindingsAreSorted = 0x01 }
 
- 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 QRhiShaderResourceBindings
 QRhiShaderResourceBindings (QRhiImplementation *rhi)
 
- Protected Member Functions inherited from QRhiResource
 QRhiResource (QRhiImplementation *rhi)
 
- Protected Attributes inherited from QRhiShaderResourceBindings
QVarLengthArray< QRhiShaderResourceBinding, BINDING_PREALLOCm_bindings
 
size_t m_layoutDescHash = 0
 
QVector< quint32m_layoutDesc
 
- Protected Attributes inherited from QRhiResource
QRhiImplementationm_rhi = nullptr
 
quint64 m_id
 
QByteArray m_objectName
 
- Static Protected Attributes inherited from QRhiShaderResourceBindings
static constexpr int BINDING_PREALLOC = 12
 

Detailed Description

Definition at line 222 of file qrhigles2_p.h.

Constructor & Destructor Documentation

◆ QGles2ShaderResourceBindings()

QGles2ShaderResourceBindings::QGles2ShaderResourceBindings ( QRhiImplementation * rhi)

Definition at line 6184 of file qrhigles2.cpp.

◆ ~QGles2ShaderResourceBindings()

QGles2ShaderResourceBindings::~QGles2ShaderResourceBindings ( )

Definition at line 6189 of file qrhigles2.cpp.

References destroy().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

bool QGles2ShaderResourceBindings::create ( )
overridevirtual

Implements QRhiShaderResourceBindings.

Definition at line 6201 of file qrhigles2.cpp.

References QVarLengthArray< T, Prealloc >::at(), generation, hasDynamicOffset, i, QRhiShaderResourceBindings::m_bindings, QRHI_RES_RHI, QRhiImplementation::shaderResourceBindingData(), QVLABaseBase::size(), and QRhiShaderResourceBinding::UniformBuffer.

+ Here is the call graph for this function:

◆ destroy()

void QGles2ShaderResourceBindings::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 6194 of file qrhigles2.cpp.

References QRHI_RES_RHI.

Referenced by ~QGles2ShaderResourceBindings().

+ Here is the caller graph for this function:

◆ updateResources()

void QGles2ShaderResourceBindings::updateResources ( UpdateFlags flags)
overridevirtual

Implements QRhiShaderResourceBindings.

Definition at line 6225 of file qrhigles2.cpp.

References generation, and Q_UNUSED.

Friends And Related Symbol Documentation

◆ QRhiGles2

friend class QRhiGles2
friend

Definition at line 232 of file qrhigles2_p.h.

Member Data Documentation

◆ generation

uint QGles2ShaderResourceBindings::generation = 0

Definition at line 231 of file qrhigles2_p.h.

Referenced by create(), and updateResources().

◆ hasDynamicOffset

bool QGles2ShaderResourceBindings::hasDynamicOffset = false

Definition at line 230 of file qrhigles2_p.h.

Referenced by create().


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