Describes the layout of vertex inputs consumed by a vertex shader. More...
| Header: | #include <rhi/qrhi.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
| qmake: | QT += gui-private |
| Since: | Qt 6.6 |
| QRhiVertexInputLayout() | |
| const QRhiVertexInputAttribute * | attributeAt(qsizetype index) const |
| qsizetype | attributeCount() const |
| const QRhiVertexInputBinding * | bindingAt(qsizetype index) const |
| qsizetype | bindingCount() const |
| const QRhiVertexInputAttribute * | cbeginAttributes() const |
| const QRhiVertexInputBinding * | cbeginBindings() const |
| const QRhiVertexInputAttribute * | cendAttributes() const |
| const QRhiVertexInputBinding * | cendBindings() const |
| void | setAttributes(std::initializer_list<QRhiVertexInputAttribute> list) |
| void | setAttributes(InputIterator first, InputIterator last) |
| void | setBindings(std::initializer_list<QRhiVertexInputBinding> list) |
| void | setBindings(InputIterator first, InputIterator last) |
| size_t | qHash(const QRhiVertexInputLayout &key, size_t seed = 0) |
| bool | operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) |
| bool | operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) |
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 setVertexInput() later on:
QRhiVertexInputLayout inputLayout; inputLayout.setBindings({ { 5 * sizeof(float) } }); inputLayout.setAttributes({ { 0, 0, QRhiVertexInputAttribute::Float3, 0 }, { 0, 1, QRhiVertexInputAttribute::Float2, 3 * sizeof(float) } });
Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.
[constexpr noexcept] QRhiVertexInputLayout::QRhiVertexInputLayout()Constructs an empty vertex input layout description.
Returns the attribute at the given index.
Returns the number of attributes.
Returns the binding at the given index.
Returns the number of bindings.
Returns a const iterator pointing to the first item in the attribute list.
Returns a const iterator pointing to the first item in the binding list.
Returns a const iterator pointing just after the last item in the attribute list.
Returns a const iterator pointing just after the last item in the binding list.
Sets the attributes from the specified list.
Sets the attributes using the iterators first and last.
Sets the bindings from the specified list.
Sets the bindings using the iterators first and last.
[noexcept] size_t qHash(const QRhiVertexInputLayout &key, size_t seed = 0)Returns the hash value for key, using seed to seed the calculation.
[noexcept] bool operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout
&b)Returns false if the values in the two QRhiVertexInputLayout objects a and b are equal; otherwise returns
true.
[noexcept] bool operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout
&b)Returns true if the values in the two QRhiVertexInputLayout objects a and b are equal.