PySide6.QtGui.QRhiVertexInputLayout¶
- class QRhiVertexInputLayout¶
Describes the layout of vertex inputs consumed by a vertex shader.
Details
The vertex input layout is defined by the collections of
QRhiVertexInputBindingandQRhiVertexInputAttribute.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 usingsetVertexInput()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
QRhifor details.Added in version 6.6.
Synopsis¶
Methods¶
def
__init__()def
attributeAt()def
attributeCount()def
bindingAt()def
bindingCount()def
cbeginBindings()def
cendAttributes()def
cendBindings()def
__ne__()def
__eq__()def
setAttributes()def
setBindings()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
Constructs an empty vertex input layout description.
- attributeAt(index)¶
- Parameters:
index – int
- Return type:
Returns the attribute at the given
index.- attributeCount()¶
- Return type:
int
Returns the number of attributes.
- bindingAt(index)¶
- Parameters:
index – int
- Return type:
Returns the binding at the given
index.- bindingCount()¶
- Return type:
int
Returns the number of bindings.
- cbeginAttributes()¶
- Return type:
Returns a const iterator pointing to the first item in the attribute list.
- cbeginBindings()¶
- Return type:
Returns a const iterator pointing to the first item in the binding list.
- cendAttributes()¶
- Return type:
Returns a const iterator pointing just after the last item in the attribute list.
- cendBindings()¶
- Return type:
Returns a const iterator pointing just after the last item in the binding list.
- __ne__(b)¶
- Parameters:
- Return type:
bool
Returns
falseif the values in the twoQRhiVertexInputLayoutobjectsaandbare equal; otherwise returnstrue.- __eq__(b)¶
- Parameters:
- Return type:
bool
Returns
trueif the values in the twoQRhiVertexInputLayoutobjectsaandbare equal.- setAttributes(attributes)¶
- Parameters:
attributes – .list of QRhiVertexInputAttribute
- setBindings(bindings)¶
- Parameters:
bindings – .list of QRhiVertexInputBinding