6#include <QtQuick/qsgvertexcolormaterial.h>
7#include <QtQuick/qsgtexturematerial.h>
9#include <QtQuick/private/qsgcontext_p.h>
11#include <QtCore/qmath.h>
12#include <QtCore/qvarlengtharray.h>
34 const int shaderMatrixCount = newMaterial->viewCount();
35 const int matrixCount =
qMin(
state.projectionMatrixCount(), shaderMatrixCount);
37 for (
int viewIndex = 0; viewIndex < matrixCount; ++viewIndex) {
38 if (
state.isMatrixDirty()) {
40 memcpy(
buf->data() + 64 * viewIndex,
m.constData(), 64);
45 if (oldMaterial ==
nullptr) {
50 memcpy(
buf->data() + 64 * shaderMatrixCount, &
v, 8);
54 if (
state.isOpacityDirty()) {
55 const float opacity =
state.opacity();
56 memcpy(
buf->data() + 64 * shaderMatrixCount + 8, &opacity, 4);
109 if (wasBlending != isBlending) {
int alpha() const noexcept
Returns the alpha color component of this color.
qsizetype size() const noexcept
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
\inmodule QtCore\reentrant
QGradientStops m_gradient_stops
uint m_gradient_is_opaque
QSGDefaultInternalRectangleNode()
void updateMaterialAntialiasing() override
void updateMaterialBlending(QSGNode::DirtyState *state) override
QSGMaterial * material() const
Returns the material of the QSGGeometryNode.
void setMaterial(QSGMaterial *material)
Sets the material of this geometry node to material.
Encapsulates the current rendering state during a call to QSGMaterialShader::updateUniformData() and ...
The QSGMaterialShader class represents a graphics API independent shader program.
void setShaderFileName(Stage stage, const QString &filename)
Sets the filename for the shader for the specified stage.
The QSGMaterial class encapsulates rendering state for a shader program.
QSGMaterial::Flags flags() const
Returns the material's flags.
void setFlag(Flags flags, bool on=true)
Sets the flags flags on this material if on is true; otherwise clears the attribute.
@ RequiresFullMatrixExceptTranslate
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
The QVector2D class represents a vector or vertex in 2D space.
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
SmoothColorMaterialRhiShader(int viewCount)
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
GLsizei const GLfloat * v
[13]
GLenum GLuint GLenum GLsizei const GLchar * buf
#define QStringLiteral(str)
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.