From b87b3d3d43c200f22f0799ca59ab366d851b5db6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sat, 2 May 2020 14:27:13 +0200 Subject: Make QSGMaterialRhiShader become QSGMaterialShader After a symbiotic relationship in Qt 5.14 and 5.15, it is time for QSGMaterialRhiShader to devour its older sibling and take its place. This makes the direct OpenGL rendering path disfunctional. All QSGMaterial Qt 6 TODOs are solved, the API is clean and straightforward again: a QSGMaterial creates a QSGMaterialShader, no special flags and options needed. (it's just that QSGMaterialShader now has a slightly different API) Task-number: QTBUG-79268 Task-number: QTBUG-82997 Change-Id: I545ca8d796c5535e81957c706e7832133be15b7d Reviewed-by: Eirik Aavitsland --- examples/quick/scenegraph/graph/linenode.cpp | 4 +--- examples/quick/scenegraph/graph/noisynode.cpp | 4 +--- examples/quick/scenegraph/twotextureproviders/xorblender.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'examples/quick') diff --git a/examples/quick/scenegraph/graph/linenode.cpp b/examples/quick/scenegraph/graph/linenode.cpp index 5d4d8acd20..6cdf063bb9 100644 --- a/examples/quick/scenegraph/graph/linenode.cpp +++ b/examples/quick/scenegraph/graph/linenode.cpp @@ -54,7 +54,7 @@ #include -class LineShader : public QSGMaterialRhiShader +class LineShader : public QSGMaterialShader { public: LineShader() { @@ -70,7 +70,6 @@ class LineMaterial : public QSGMaterial public: LineMaterial() { - setFlag(SupportsRhiShader); setFlag(Blending); } @@ -82,7 +81,6 @@ public: QSGMaterialShader *createShader() const override { - Q_ASSERT(flags().testFlag(RhiShaderWanted)); return new LineShader; } diff --git a/examples/quick/scenegraph/graph/noisynode.cpp b/examples/quick/scenegraph/graph/noisynode.cpp index c39e775e98..c35b4ee01e 100644 --- a/examples/quick/scenegraph/graph/noisynode.cpp +++ b/examples/quick/scenegraph/graph/noisynode.cpp @@ -58,7 +58,7 @@ #define NOISE_SIZE 64 -class NoisyShader : public QSGMaterialRhiShader +class NoisyShader : public QSGMaterialShader { public: NoisyShader() { @@ -76,7 +76,6 @@ class NoisyMaterial : public QSGMaterial public: NoisyMaterial() { - setFlag(SupportsRhiShader); setFlag(Blending); } @@ -93,7 +92,6 @@ public: QSGMaterialShader *createShader() const override { - Q_ASSERT(flags().testFlag(RhiShaderWanted)); return new NoisyShader; } diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp index 9971f202a7..cb61679141 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp @@ -78,7 +78,7 @@ public: } state; }; -class XorBlendRhiShader : public QSGMaterialRhiShader +class XorBlendRhiShader : public QSGMaterialShader { public: XorBlendRhiShader(); @@ -90,13 +90,11 @@ public: XorBlendMaterial::XorBlendMaterial() { - setFlag(SupportsRhiShader); setFlag(Blending); } QSGMaterialShader *XorBlendMaterial::createShader() const { - Q_ASSERT(flags().testFlag(RhiShaderWanted)); return new XorBlendRhiShader; } -- cgit v1.2.3