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
QRhiVertexInputLayout Class Reference

\inmodule QtGui More...

#include <qrhi.h>

+ Collaboration diagram for QRhiVertexInputLayout:

Public Member Functions

 QRhiVertexInputLayout ()=default
 Constructs an empty vertex input layout description.
 
void setBindings (std::initializer_list< QRhiVertexInputBinding > list)
 Sets the bindings from the specified list.
 
template<typename InputIterator >
void setBindings (InputIterator first, InputIterator last)
 Sets the bindings using the iterators first and last.
 
const QRhiVertexInputBindingcbeginBindings () const
 
const QRhiVertexInputBindingcendBindings () const
 
const QRhiVertexInputBindingbindingAt (qsizetype index) const
 
qsizetype bindingCount () const
 
void setAttributes (std::initializer_list< QRhiVertexInputAttribute > list)
 Sets the attributes from the specified list.
 
template<typename InputIterator >
void setAttributes (InputIterator first, InputIterator last)
 Sets the attributes using the iterators first and last.
 
const QRhiVertexInputAttributecbeginAttributes () const
 
const QRhiVertexInputAttributecendAttributes () const
 
const QRhiVertexInputAttributeattributeAt (qsizetype index) const
 
qsizetype attributeCount () const
 

Friends

bool operator== (const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) noexcept
 
bool operator!= (const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) noexcept
 
size_t qHash (const QRhiVertexInputLayout &v, size_t seed=0) noexcept
 
Q_GUI_EXPORT QDebug operator<< (QDebug, const QRhiVertexInputLayout &)
 

Detailed Description

\inmodule QtGui

Since
6.6

Describes the layout of vertex inputs consumed by a vertex shader.

The vertex input layout is defined by the collections of QRhiVertexInputBinding and QRhiVertexInputAttribute.

As an example, let's assume that we have a single buffer with 3 component vertex positions and 2 component UV coordinates interleaved (x, y, z, u, v), that the position and UV are expected at input locations 0 and 1 by the vertex shader, and that the vertex buffer will be bound at binding point 0 using \l{QRhiCommandBuffer::setVertexInput()}{setVertexInput()} later on:

inputLayout.setBindings({
{ 5 * sizeof(float) }
});
inputLayout.setAttributes({
{ 0, 1, QRhiVertexInputAttribute::Float2, 3 * sizeof(float) }
});
\inmodule QtGui
Definition qrhi.h:321
void setBindings(std::initializer_list< QRhiVertexInputBinding > list)
Sets the bindings from the specified list.
Definition qrhi.h:325
void setAttributes(std::initializer_list< QRhiVertexInputAttribute > list)
Sets the attributes from the specified list.
Definition qrhi.h:337
Note
This is a RHI API with limited compatibility guarantees, see \l QRhi for details.

Definition at line 320 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiVertexInputLayout()

QRhiVertexInputLayout::QRhiVertexInputLayout ( )
default

Constructs an empty vertex input layout description.

Member Function Documentation

◆ attributeAt()

const QRhiVertexInputAttribute * QRhiVertexInputLayout::attributeAt ( qsizetype index) const
inline
Returns
the attribute at the given index.

Definition at line 346 of file qrhi.h.

◆ attributeCount()

qsizetype QRhiVertexInputLayout::attributeCount ( ) const
inline
Returns
the number of attributes.

Definition at line 347 of file qrhi.h.

◆ bindingAt()

const QRhiVertexInputBinding * QRhiVertexInputLayout::bindingAt ( qsizetype index) const
inline
Returns
the binding at the given index.

Definition at line 334 of file qrhi.h.

Referenced by QD3D11GraphicsPipeline::create(), and QRhiD3D11::setVertexInput().

+ Here is the caller graph for this function:

◆ bindingCount()

qsizetype QRhiVertexInputLayout::bindingCount ( ) const
inline
Returns
the number of bindings.

Definition at line 335 of file qrhi.h.

◆ cbeginAttributes()

const QRhiVertexInputAttribute * QRhiVertexInputLayout::cbeginAttributes ( ) const
inline
Returns
a const iterator pointing to the first item in the attribute list.

Definition at line 344 of file qrhi.h.

Referenced by QSSGRhiHelpers::bakeVertexInputLocations(), QD3D11GraphicsPipeline::create(), QVkGraphicsPipeline::create(), QMetalGraphicsPipelineData::setupStageInputDescriptor(), and QMetalGraphicsPipelineData::setupVertexInputDescriptor().

+ Here is the caller graph for this function:

◆ cbeginBindings()

const QRhiVertexInputBinding * QRhiVertexInputLayout::cbeginBindings ( ) const
inline
Returns
a const iterator pointing to the first item in the binding list.

Definition at line 332 of file qrhi.h.

Referenced by QVkGraphicsPipeline::create(), QMetalGraphicsPipelineData::setupStageInputDescriptor(), QMetalGraphicsPipelineData::setupVertexInputDescriptor(), and QRhiD3D11::setVertexInput().

+ Here is the caller graph for this function:

◆ cendAttributes()

const QRhiVertexInputAttribute * QRhiVertexInputLayout::cendAttributes ( ) const
inline
Returns
a const iterator pointing just after the last item in the attribute list.

Definition at line 345 of file qrhi.h.

Referenced by QSSGRhiHelpers::bakeVertexInputLocations(), QD3D11GraphicsPipeline::create(), QVkGraphicsPipeline::create(), QMetalGraphicsPipelineData::setupStageInputDescriptor(), and QMetalGraphicsPipelineData::setupVertexInputDescriptor().

+ Here is the caller graph for this function:

◆ cendBindings()

const QRhiVertexInputBinding * QRhiVertexInputLayout::cendBindings ( ) const
inline
Returns
a const iterator pointing just after the last item in the binding list.

Definition at line 333 of file qrhi.h.

Referenced by QVkGraphicsPipeline::create(), QMetalGraphicsPipelineData::setupStageInputDescriptor(), QMetalGraphicsPipelineData::setupVertexInputDescriptor(), and QRhiD3D11::setVertexInput().

+ Here is the caller graph for this function:

◆ setAttributes() [1/2]

template<typename InputIterator >
template< typename InputIterator > void QRhiVertexInputLayout::setAttributes ( InputIterator first,
InputIterator last )
inline

Sets the attributes using the iterators first and last.

Definition at line 339 of file qrhi.h.

◆ setAttributes() [2/2]

void QRhiVertexInputLayout::setAttributes ( std::initializer_list< QRhiVertexInputAttribute > list)
inline

Sets the attributes from the specified list.

Definition at line 337 of file qrhi.h.

References list.

Referenced by QSSGRenderReflectionMap::addReflectionMapEntry(), QSSGRhiHelpers::bakeVertexInputLocations(), QSGBatchRenderer::calculateVertexInputLayout(), createGraphicsPipeline(), ExampleRhiWidget::initialize(), ExampleRhiItemRenderer::initialize(), main(), newGraphicsPipeline(), renderToKTXFileInternal(), QVideoWindowPrivate::setupGraphicsPipeline(), and updateTextures().

+ Here is the caller graph for this function:

◆ setBindings() [1/2]

template<typename InputIterator >
template< typename InputIterator > void QRhiVertexInputLayout::setBindings ( InputIterator first,
InputIterator last )
inline

Sets the bindings using the iterators first and last.

Definition at line 327 of file qrhi.h.

◆ setBindings() [2/2]

void QRhiVertexInputLayout::setBindings ( std::initializer_list< QRhiVertexInputBinding > list)
inline

Sets the bindings from the specified list.

Definition at line 325 of file qrhi.h.

References list.

Referenced by QSSGRenderReflectionMap::addReflectionMapEntry(), QSGBatchRenderer::calculateVertexInputLayout(), createGraphicsPipeline(), ExampleRhiWidget::initialize(), ExampleRhiItemRenderer::initialize(), main(), newGraphicsPipeline(), renderToKTXFileInternal(), QVideoWindowPrivate::setupGraphicsPipeline(), and updateTextures().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QRhiVertexInputLayout::operator!= ( const QRhiVertexInputLayout & a,
const QRhiVertexInputLayout & b )
friend
Returns
false if the values in the two QRhiVertexInputLayout objects a and b are equal; otherwise returns true.

Definition at line 358 of file qrhi.h.

◆ operator<<

Q_GUI_EXPORT QDebug operator<< ( QDebug ,
const QRhiVertexInputLayout &  )
friend

Definition at line 2075 of file qrhi.cpp.

◆ operator==

bool QRhiVertexInputLayout::operator== ( const QRhiVertexInputLayout & a,
const QRhiVertexInputLayout & b )
friend
Returns
true if the values in the two QRhiVertexInputLayout objects a and b are equal.

Definition at line 353 of file qrhi.h.

◆ qHash

size_t QRhiVertexInputLayout::qHash ( const QRhiVertexInputLayout & v,
size_t seed = 0 )
friend
Returns
the hash value for v, using seed to seed the calculation.

Definition at line 363 of file qrhi.h.


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