Auf dieser Seite

QRhiVertexInputLayout Class

Beschreibt das Layout der von einem Vertex-Shader verwendeten Vertex-Eingaben. Mehr...

Header: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Seit: Qt 6.6

Öffentliche Funktionen

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)

Ausführliche Beschreibung

Das Eingabelayout für Knoten wird durch die Sammlungen „ QRhiVertexInputBinding “ und „ QRhiVertexInputAttribute “ definiert.

Nehmen wir als Beispiel an, nehmen wir an, dass wir einen einzelnen Puffer mit 3-komponentigen Vertex-Positionen und 2-komponentigen UV-Koordinaten haben, die miteinander verschachtelt sind (x, y, z, u, v), dass die Position und die UV-Koordinaten vom Vertex-Shader an den Eingabepositionen 0 und 1 erwartet werden und dass der Vertex-Puffer später mit setVertexInput() am Bindungspunkt 0 gebunden wird:

QRhiVertexInputLayout inputLayout;
inputLayout.setBindings({
    { 5 * sizeof(float) }
});
inputLayout.setAttributes({
    { 0, 0, QRhiVertexInputAttribute::Float3, 0 },
    { 0, 1, QRhiVertexInputAttribute::Float2, 3 * sizeof(float) }
});

Hinweis: Hierbei handelt es sich um eine RHI-API mit eingeschränkten Kompatibilitätsgarantien; weitere Informationen finden Sie unter QRhi.

Dokumentation der Member-Funktionen

[constexpr noexcept default] QRhiVertexInputLayout::QRhiVertexInputLayout()

Erstellt eine leere Beschreibung des Eingabelayouts für Knoten.

const QRhiVertexInputAttribute *QRhiVertexInputLayout::attributeAt(qsizetype index) const

Gibt das Attribut an der angegebenen Adresse „ index “ zurück.

qsizetype QRhiVertexInputLayout::attributeCount() const

Gibt die Anzahl der Attribute zurück.

const QRhiVertexInputBinding *QRhiVertexInputLayout::bindingAt(qsizetype index) const

Gibt die Bindung an der angegebenen Adresse „ index “ zurück.

qsizetype QRhiVertexInputLayout::bindingCount() const

Gibt die Anzahl der Bindungen zurück.

const QRhiVertexInputAttribute *QRhiVertexInputLayout::cbeginAttributes() const

Gibt einen konstanten Iterator zurück, der auf das erste Element der Attributliste verweist.

const QRhiVertexInputBinding *QRhiVertexInputLayout::cbeginBindings() const

Gibt einen konstanten Iterator zurück, der auf das erste Element der Bindungsliste verweist.

const QRhiVertexInputAttribute *QRhiVertexInputLayout::cendAttributes() const

Gibt einen konstanten Iterator zurück, der direkt auf die Stelle nach dem letzten Element in der Attributliste zeigt.

const QRhiVertexInputBinding *QRhiVertexInputLayout::cendBindings() const

Gibt einen konstanten Iterator zurück, der direkt auf das Element nach dem letzten Element in der Bindungsliste zeigt.

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

Legt die Attribute aus der angegebenen Datei „ list “ fest.

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

Legt die Attribute mithilfe der Iteratoren „ first “ und „ last “ fest.

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

Legt die Bindungen aus der angegebenen „ list “ fest.

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

Legt die Bindungen mithilfe der Iteratoren first und last fest.

Verwandte Nicht-Mitglieder

[noexcept] size_t qHash(const QRhiVertexInputLayout &key, size_t seed = 0)

Gibt den Hash-Wert für key zurück, wobei seed als Startwert für die Berechnung verwendet wird.

[noexcept] bool operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b)

Gibt „ false “ zurück, wenn die Werte in den beiden „ QRhiVertexInputLayout “-Objekten „ a “ und „ b “ identisch sind; andernfalls wird „ true “ zurückgegeben.

[noexcept] bool operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b)

Gibt „ true “ zurück, wenn die Werte in den beiden „ QRhiVertexInputLayout “-Objekten „ a “ und „ b “ identisch sind.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.