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

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h 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 QRhiVertexInputBinding * cbeginBindings () const
const QRhiVertexInputBinding * cendBindings () const
const QRhiVertexInputBinding * bindingAt (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 QRhiVertexInputAttribute * cbeginAttributes () const
const QRhiVertexInputAttribute * cendAttributes () const
const QRhiVertexInputAttribute * attributeAt (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
 \qhash{QRhiVertexInputLayout}
Q_GUI_EXPORT QDebug operator<< (QDebug dbg, const QRhiVertexInputLayout &v)

Detailed Description

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h

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) }
});
QRhiVertexInputLayout()=default
Constructs an empty vertex input layout description.
void setBindings(std::initializer_list< QRhiVertexInputBinding > list)
Sets the bindings from the specified list.
Definition qrhi.h:329
void setAttributes(std::initializer_list< QRhiVertexInputAttribute > list)
Sets the attributes from the specified list.
Definition qrhi.h:341
Note
This is a RHI API with limited compatibility guarantees, see \l QRhi for details.

Definition at line 324 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 350 of file qrhi.h.

◆ attributeCount()

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

Definition at line 351 of file qrhi.h.

◆ bindingAt()

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

Definition at line 338 of file qrhi.h.

◆ bindingCount()

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

Definition at line 339 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 348 of file qrhi.h.

◆ cbeginBindings()

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

Definition at line 336 of file qrhi.h.

◆ cendAttributes()

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

Definition at line 349 of file qrhi.h.

◆ cendBindings()

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

Definition at line 337 of file qrhi.h.

◆ setAttributes() [1/2]

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

Sets the attributes using the iterators first and last.

Definition at line 343 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 341 of file qrhi.h.

◆ setBindings() [1/2]

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

Sets the bindings using the iterators first and last.

Definition at line 331 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 329 of file qrhi.h.

◆ operator!=

bool 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 362 of file qrhi.h.

◆ operator<<

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

Definition at line 2301 of file qrhi.cpp.

◆ operator==

bool 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 357 of file qrhi.h.

◆ qHash

size_t qHash ( const QRhiVertexInputLayout & v,
size_t seed = 0 )
friend

\qhash{QRhiVertexInputLayout}

Definition at line 367 of file qrhi.h.


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