|
| 1 | +diff --git a/qt6/src/CMakeLists.txt b/qt6/src/CMakeLists.txt |
| 2 | +index 4314b72..a7ecaf1 100644 |
| 3 | +--- a/qt6/src/CMakeLists.txt |
| 4 | ++++ b/qt6/src/CMakeLists.txt |
| 5 | +@@ -25,6 +25,7 @@ dtk_extend_target(${PLUGIN_NAME} EnableCov ${ENABLE_COV}) |
| 6 | + qt_add_translations(${LIB_NAME} |
| 7 | + TS_FILES ${TS_FILES} |
| 8 | + QM_FILES_OUTPUT_VARIABLE QM_FILES |
| 9 | ++ IMMEDIATE_CALL |
| 10 | + ) |
| 11 | + |
| 12 | + set_target_properties(${LIB_NAME} PROPERTIES |
| 13 | +diff --git a/src/private/dbackdropnode.cpp b/src/private/dbackdropnode.cpp |
| 14 | +index 91c398a..1ed0ad8 100644 |
| 15 | +--- a/src/private/dbackdropnode.cpp |
| 16 | ++++ b/src/private/dbackdropnode.cpp |
| 17 | +@@ -320,8 +320,8 @@ public: |
| 18 | + renderer->setDevicePixelRatio(base->devicePixelRatio()); |
| 19 | + renderer->setDeviceRect(base->deviceRect()); |
| 20 | + renderer->setViewportRect(base->viewportRect()); |
| 21 | +- renderer->setProjectionMatrix(base->projectionMatrix()); |
| 22 | +- renderer->setProjectionMatrixWithNativeNDC(base->projectionMatrixWithNativeNDC()); |
| 23 | ++ renderer->setProjectionMatrix(base->projectionMatrix(0)); |
| 24 | ++ renderer->setProjectionMatrixWithNativeNDC(base->projectionMatrixWithNativeNDC(0)); |
| 25 | + } else { |
| 26 | + renderer->setDevicePixelRatio(1.0); |
| 27 | + renderer->setDeviceRect(QRect(QPoint(0, 0), pixelSize)); |
| 28 | +@@ -336,8 +336,8 @@ public: |
| 29 | + } |
| 30 | + |
| 31 | + if (Q_UNLIKELY(!matrix.isIdentity())) { |
| 32 | +- renderer->setProjectionMatrix(renderer->projectionMatrix() * matrix); |
| 33 | +- renderer->setProjectionMatrixWithNativeNDC(renderer->projectionMatrixWithNativeNDC() * matrix); |
| 34 | ++ renderer->setProjectionMatrix(renderer->projectionMatrix(0) * matrix); |
| 35 | ++ renderer->setProjectionMatrixWithNativeNDC(renderer->projectionMatrixWithNativeNDC(0) * matrix); |
| 36 | + } |
| 37 | + |
| 38 | + renderer->setRootNode(rootNode); |
| 39 | +diff --git a/src/private/dmaskeffectnode.cpp b/src/private/dmaskeffectnode.cpp |
| 40 | +index c4db07d..da1e4ce 100644 |
| 41 | +--- a/src/private/dmaskeffectnode.cpp |
| 42 | ++++ b/src/private/dmaskeffectnode.cpp |
| 43 | +@@ -35,7 +35,7 @@ protected: |
| 44 | + class OpaqueTextureMaterialShader : public QSGOpaqueTextureMaterialRhiShader |
| 45 | + { |
| 46 | + public: |
| 47 | +- OpaqueTextureMaterialShader(); |
| 48 | ++ OpaqueTextureMaterialShader(int viewCount); |
| 49 | + |
| 50 | + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; |
| 51 | + |
| 52 | +@@ -48,7 +48,7 @@ public: |
| 53 | + class TextureMaterialShader : public OpaqueTextureMaterialShader |
| 54 | + { |
| 55 | + public: |
| 56 | +- TextureMaterialShader(); |
| 57 | ++ TextureMaterialShader(int viewCount); |
| 58 | + |
| 59 | + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 60 | + void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; |
| 61 | +@@ -61,7 +61,8 @@ protected: |
| 62 | + #endif |
| 63 | + }; |
| 64 | + |
| 65 | +-OpaqueTextureMaterialShader::OpaqueTextureMaterialShader() |
| 66 | ++OpaqueTextureMaterialShader::OpaqueTextureMaterialShader(int viewCount) |
| 67 | ++ : QSGOpaqueTextureMaterialRhiShader(viewCount) |
| 68 | + { |
| 69 | + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 70 | + #if QT_CONFIG(opengl) |
| 71 | +@@ -236,8 +237,8 @@ bool OpaqueTextureMaterialShader::updateGraphicsPipelineState(RenderState &state |
| 72 | + } |
| 73 | + #endif |
| 74 | + |
| 75 | +-TextureMaterialShader::TextureMaterialShader() |
| 76 | +- : OpaqueTextureMaterialShader() |
| 77 | ++TextureMaterialShader::TextureMaterialShader(int viewCount) |
| 78 | ++ : OpaqueTextureMaterialShader(viewCount) |
| 79 | + { |
| 80 | + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // TODO qt6 |
| 81 | + #if QT_CONFIG(opengl) |
| 82 | +@@ -529,7 +530,7 @@ QSGMaterialShader *TextureMaterial::createShader() const |
| 83 | + QSGMaterialShader *TextureMaterial::createShader(QSGRendererInterface::RenderMode renderMode) const |
| 84 | + { |
| 85 | + Q_UNUSED(renderMode) |
| 86 | +- return new TextureMaterialShader; |
| 87 | ++ return new TextureMaterialShader(viewCount()); |
| 88 | + } |
| 89 | + #endif |
| 90 | + |
| 91 | +@@ -553,7 +554,7 @@ QSGMaterialShader *OpaqueTextureMaterial::createShader() const |
| 92 | + QSGMaterialShader *OpaqueTextureMaterial::createShader(QSGRendererInterface::RenderMode renderMode) const |
| 93 | + { |
| 94 | + Q_UNUSED(renderMode) |
| 95 | +- return new OpaqueTextureMaterialShader; |
| 96 | ++ return new OpaqueTextureMaterialShader(viewCount()); |
| 97 | + } |
| 98 | + #endif |
| 99 | + |
| 100 | +diff --git a/src/private/drectanglenode.cpp b/src/private/drectanglenode.cpp |
| 101 | +index efeeab6..b961588 100644 |
| 102 | +--- a/src/private/drectanglenode.cpp |
| 103 | ++++ b/src/private/drectanglenode.cpp |
| 104 | +@@ -72,7 +72,8 @@ void CornerColorShader::initialize() |
| 105 | + m_idQtOpacity = program->uniformLocation("qt_Opacity"); |
| 106 | + } |
| 107 | + #else |
| 108 | +-CornerColorShader::CornerColorShader() |
| 109 | ++CornerColorShader::CornerColorShader(int viewCount) |
| 110 | ++ : QSGOpaqueTextureMaterialRhiShader(viewCount) |
| 111 | + { |
| 112 | + setShaderFileName(QSGMaterialShader::VertexStage, QStringLiteral(":/dtk/declarative/shaders_ng/cornerscolorshader.vert.qsb")); |
| 113 | + setShaderFileName(QSGMaterialShader::FragmentStage, QStringLiteral(":/dtk/declarative/shaders_ng/cornerscolorshader.frag.qsb")); |
| 114 | +@@ -128,7 +129,7 @@ QSGMaterialShader *CornerColorMaterial::createShader() const |
| 115 | + QSGMaterialShader *CornerColorMaterial::createShader(QSGRendererInterface::RenderMode renderMode) const |
| 116 | + { |
| 117 | + Q_UNUSED(renderMode) |
| 118 | +- return new CornerColorShader; |
| 119 | ++ return new CornerColorShader(viewCount()); |
| 120 | + } |
| 121 | + #endif |
| 122 | + |
| 123 | +diff --git a/src/private/drectanglenode_p.h b/src/private/drectanglenode_p.h |
| 124 | +index aee5a7c..7962154 100644 |
| 125 | +--- a/src/private/drectanglenode_p.h |
| 126 | ++++ b/src/private/drectanglenode_p.h |
| 127 | +@@ -37,7 +37,7 @@ private: |
| 128 | + class CornerColorShader : public QSGOpaqueTextureMaterialRhiShader |
| 129 | + { |
| 130 | + public: |
| 131 | +- CornerColorShader(); |
| 132 | ++ CornerColorShader(int viewCount); |
| 133 | + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); |
| 134 | + }; |
| 135 | + #endif |
0 commit comments