diff options
Diffstat (limited to 'src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp index ca92062120..fc3ea4e22e 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp @@ -102,6 +102,7 @@ QSGMaterialType *QSGD3D12VertexColorMaterial::type() const int QSGD3D12VertexColorMaterial::compare(const QSGMaterial *other) const { + Q_UNUSED(other); Q_ASSERT(other && type() == other->type()); // As the vertex color material has all its state in the vertex attributes // defined by the geometry, all such materials will be equal. @@ -148,6 +149,11 @@ QSGD3D12Material::UpdateResults QSGD3D12VertexColorMaterial::updatePipeline(cons return r; } +QSGD3D12FlatColorMaterial::QSGD3D12FlatColorMaterial() + : m_color(QColor(255, 255, 255)) +{ +} + QSGMaterialType QSGD3D12FlatColorMaterial::mtype; QSGMaterialType *QSGD3D12FlatColorMaterial::type() const @@ -224,6 +230,7 @@ QSGMaterialType *QSGD3D12SmoothColorMaterial::type() const int QSGD3D12SmoothColorMaterial::compare(const QSGMaterial *other) const { + Q_UNUSED(other); Q_ASSERT(other && type() == other->type()); return 0; } @@ -353,6 +360,12 @@ QSGD3D12Material::UpdateResults QSGD3D12TextureMaterial::updatePipeline(const QS return r; } +void QSGD3D12TextureMaterial::setTexture(QSGTexture *texture) +{ + m_texture = texture; + setFlag(Blending, m_texture ? m_texture->hasAlphaChannel() : false); +} + QSGD3D12SmoothTextureMaterial::QSGD3D12SmoothTextureMaterial() { setFlag(RequiresFullMatrixExceptTranslate, true); |