29 if (
state.isMatrixDirty()) {
31 memcpy(
buf->data(),
m.constData(), 64);
35 if (
state.isOpacityDirty()) {
36 const float opacity =
state.opacity();
37 memcpy(
buf->data() + 64, &opacity, 4);
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
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.
void setFlag(Flags flags, bool on=true)
Sets the flags flags on this material if on is true; otherwise clears the attribute.
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
QSGVertexColorMaterialRhiShader()
bool updateUniformData(RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
int compare(const QSGMaterial *other) const override
int QSGVertexColorMaterial::compare() const
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
QSGMaterialType * type() const override
QSGVertexColorMaterial()
Creates a new vertex color material.
Combined button and popup list for selecting options.
GLenum GLuint GLenum GLsizei const GLchar * buf
#define QStringLiteral(str)
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.