qskinny/playground/parrots/TextureFilterNode.cpp

241 lines
6.0 KiB
C++
Raw Normal View History

2023-12-07 10:24:47 +00:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
2023-12-18 08:39:17 +00:00
#include "TextureFilterNode.h"
2023-12-07 10:24:47 +00:00
#include <qsgmaterialshader.h>
#include <qsgmaterial.h>
#include <qsgtexture.h>
#include <private/qsgnode_p.h>
namespace
{
class Material : public QSGMaterial
{
public:
Material()
{
setFlag(Blending | RequiresFullMatrix, true);
}
~Material()
{
delete texture;
}
int compare( const QSGMaterial* other ) const
{
auto material = static_cast< const Material* >( other );
const auto key1 = texture->comparisonKey();
const auto key2 = material->texture->comparisonKey();
return ( key1 == key2 ) ? 0 : ( ( key1 > key2 ) ? 1 : -1 );
}
QSGMaterialType* type() const override
{
static QSGMaterialType staticType;
return &staticType;
}
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
QSGMaterialShader* createShader() const override;
#else
2023-12-07 10:24:47 +00:00
QSGMaterialShader* createShader(
QSGRendererInterface::RenderMode ) const override;
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#endif
2023-12-07 10:24:47 +00:00
QSGTexture* texture = nullptr;
};
}
namespace
{
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
class MaterialShaderGL : public QSGMaterialShader
{
public:
MaterialShaderGL()
{
setShaderSourceFile( QOpenGLShader::Vertex, ":/shaders/blur.vert" );
setShaderSourceFile( QOpenGLShader::Fragment, ":/shaders/blur.frag" );
}
char const* const* attributeNames() const override
{
static char const* const names[] = { "in_vertex", "in_coord", nullptr };
return names;
}
void initialize() override
{
QSGMaterialShader::initialize();
auto p = program();
m_matrixId = p->uniformLocation( "matrix" );
m_opacityId = p->uniformLocation( "opacity" );
}
void updateState( const QSGMaterialShader::RenderState& state,
QSGMaterial* newMaterial, QSGMaterial* ) override
{
auto p = program();
if ( state.isMatrixDirty() )
p->setUniformValue( m_matrixId, state.combinedMatrix() );
if ( state.isOpacityDirty() )
p->setUniformValue( m_opacityId, state.opacity() );
auto material = static_cast< Material* >( newMaterial );
if ( material->texture )
material->texture->bind();
}
private:
int m_matrixId = -1;
int m_opacityId = -1;
};
#else
2023-12-07 10:24:47 +00:00
class MaterialShader : public QSGMaterialShader
{
public:
MaterialShader()
{
setFlag( UpdatesGraphicsPipelineState, true );
/*
Using our own shaders - we do not want to add a dependency
to the quickeffects module.
*/
2023-12-07 10:24:47 +00:00
setShaderFileName( VertexStage, ":/shaders/blur.vert.qsb" );
2023-12-17 11:33:23 +00:00
#if 1
2023-12-07 10:24:47 +00:00
setShaderFileName( FragmentStage, ":/shaders/blur.frag.qsb" );
2023-12-15 18:16:28 +00:00
#else
setShaderFileName( FragmentStage, ":/shaders/rgbswap.frag.qsb" );
#endif
2023-12-07 10:24:47 +00:00
}
bool updateUniformData( RenderState& state,
QSGMaterial*, QSGMaterial* ) override
{
Q_ASSERT( state.uniformData()->size() >= 68 );
auto data = state.uniformData()->data();
bool changed = false;
if ( state.isMatrixDirty() )
{
const auto matrix = state.combinedMatrix();
memcpy( data + 0, matrix.constData(), 64 );
changed = true;
}
if ( state.isOpacityDirty() )
{
const float opacity = state.opacity();
memcpy( data + 64, &opacity, 4 );
changed = true;
}
return changed;
}
void updateSampledImage( RenderState& state, int binding,
QSGTexture** texture, QSGMaterial* newMaterial, QSGMaterial* ) override
{
Q_UNUSED( binding );
Q_ASSERT( binding == 1 );
auto mat = static_cast< Material* >( newMaterial );
if ( mat->texture )
{
mat->texture->commitTextureOperations(
state.rhi(), state.resourceUpdateBatch() );
*texture = mat->texture;
}
}
};
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#endif
}
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
QSGMaterialShader* Material::createShader() const
{
Q_ASSERT( !( flags() & QSGMaterial::RhiShaderWanted ) );
return new MaterialShaderGL();
2023-12-07 10:24:47 +00:00
}
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#else
2023-12-07 10:24:47 +00:00
QSGMaterialShader* Material::createShader(
QSGRendererInterface::RenderMode ) const
{
return new MaterialShader();
}
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
#endif
2023-12-18 08:39:17 +00:00
class TextureFilterNodePrivate final : public QSGGeometryNodePrivate
2023-12-07 10:24:47 +00:00
{
public:
2023-12-18 08:39:17 +00:00
TextureFilterNodePrivate()
2023-12-07 10:24:47 +00:00
: geometry( QSGGeometry::defaultAttributes_TexturedPoint2D(), 4 )
{
}
Material material;
QSGGeometry geometry;
QRectF rect;
};
2023-12-18 08:39:17 +00:00
TextureFilterNode::TextureFilterNode()
: QSGGeometryNode( *new TextureFilterNodePrivate )
2023-12-07 10:24:47 +00:00
{
2023-12-18 08:39:17 +00:00
Q_D( TextureFilterNode );
2023-12-07 10:24:47 +00:00
setMaterial( &d->material );
setGeometry( &d->geometry );
}
2023-12-18 08:39:17 +00:00
TextureFilterNode::~TextureFilterNode()
2023-12-07 10:24:47 +00:00
{
}
2023-12-18 08:39:17 +00:00
void TextureFilterNode::setTexture( QSGTexture* texture )
2023-12-07 10:24:47 +00:00
{
d_func()->material.texture = texture;
Squashed commit of the following: commit 84b7cb31a62edee3ceae702ce52be68cbe222f8a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:30:23 2023 +0100 wip commit 07c4b93e0611298e5e3981017c988fc7e45b6977 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:21:55 2023 +0100 wip commit 019448f5e1ea6eed7b767f09ae7fdb0802928a98 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 12:01:01 2023 +0100 wip commit b79f5cba8abc50bd487f08480a62d5c8bcc3c148 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:50:55 2023 +0100 wip commit 942291edb6016f29fb2f5c786b84fb7defa10ae2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:28 2023 +0100 wip commit 5ae203a03a8413416f723155bf364190937929da Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:23:16 2023 +0100 wip commit b5b4453be94c9bdc6655370c949b096061ad1c3a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 11:04:15 2023 +0100 wip commit cd519b840c6436bdec74a6a92cc5ba69a3f162de Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 10:50:13 2023 +0100 wip commit 9daed04a2c1dde10340764b6ea7769598edeff3d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:46:10 2023 +0100 wip commit c6190b84dde26b4e2790f8154ed3d81db4630b3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:34:28 2023 +0100 wip commit 837b14e8f688a29aa3294eaaa0c0dbfe66f95dce Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 09:23:01 2023 +0100 wip commit 6486c343a8cfa2a56370f20374939180b576ce2a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:41:40 2023 +0100 wip commit 230aca347b97c0a1bdb75fad6d52153688941aa6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:37:56 2023 +0100 wip commit ec4018de7e8d1940a2e693e9e8183413e02f06c2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:33:22 2023 +0100 wip commit bc3480a01f34d2e92b2445f5e73c0f12262f63a0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 08:30:41 2023 +0100 wip commit dd896518938f7828f3bc5b5275fccb90d34b08a3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:50:13 2023 +0100 wip commit c534c54ff8af674a45669bc4b688f3a28448a055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 19 07:07:19 2023 +0100 wip commit bd7af3f28e8a1a79590acb9be41e0ac9046f1fbc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:50:34 2023 +0100 wip commit 639926d3beccdc49aa98db5fe53f5eb70694a763 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:48:16 2023 +0100 wip commit b74c790aa15a23cf3d5875f6280407170d2113bb Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 17:35:51 2023 +0100 wip commit 1403da5a05c5782567b8e34e9a6672e041b483ed Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:52:45 2023 +0100 wip commit 74d69d44fc8876d95d25c1e5ab96dcf416f93a0e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 16:04:22 2023 +0100 wip commit 81269cab9a4a2f07b86442c0b5524b0364909124 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:50:08 2023 +0100 wip commit a4f0b8c98960155ee8174e0b5253affc73881158 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:49:54 2023 +0100 wip commit fc9c5f032671d9b2b8798c97e3803ef8cb98e647 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:39:34 2023 +0100 wip commit 2ca8789fed5ee98355662933fed04e8ed9b5e164 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:28:53 2023 +0100 wip commit 3a325b6dab6ee558d6d0407c4e7c639575da4f6d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:24:42 2023 +0100 wip commit 102f872db8a158274de674230f23573f941bed23 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 15:22:26 2023 +0100 wip commit 829eb67b0e6351e77f702acab90705f3cb3e9b4a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:39:31 2023 +0100 wip commit 5f89fc9257fdbd169c5f80d6776aa707848dd5c3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 14:18:18 2023 +0100 wip commit 4b9e2964c3cc3d4b08e55e98ea5b7b06b169b5f2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 13:21:48 2023 +0100 wip commit 8c94d26ed98d906a010401d7357e45249d9b11e8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:42:51 2023 +0100 wip commit 096180f6034f93725ebc9d97b8934dcca6e4b41d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 12:15:04 2023 +0100 wip commit f9f794a19e9b9d6455793a6c61c26e5e1d0e12e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:34:07 2023 +0100 wip commit 8b5a8c859503b3b155737b975fb344b2dc87bf94 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:32:03 2023 +0100 wip commit 67f78561f3bae7c4a779d75921cfabbebf802f9b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:29:32 2023 +0100 wip commit ad6515a95ea6803698f76c221c10f4160e82a668 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:19:28 2023 +0100 wip commit 2e719e809f29f07dc38ae2f3213e10bbb730c968 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:43 2023 +0100 wip commit 2212e09f165130e1621df564aa37bdbefe7377db Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 11:16:00 2023 +0100 wip commit 171aae01c802ad10ad268e35da3dcd33fc6c2b6c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:52:06 2023 +0100 wip commit ab117a43f0a405f4c09f1c395ab215bbcb09a57e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 18 10:47:41 2023 +0100 wip
2023-12-19 11:45:40 +00:00
markDirty( QSGNode::DirtyMaterial );
2023-12-07 10:24:47 +00:00
}
2023-12-18 08:39:17 +00:00
QSGTexture* TextureFilterNode::texture()
2023-12-07 10:24:47 +00:00
{
return d_func()->material.texture;
}
2023-12-18 08:39:17 +00:00
void TextureFilterNode::setRect( const QRectF& rect )
2023-12-07 10:24:47 +00:00
{
2023-12-18 08:39:17 +00:00
Q_D( TextureFilterNode );
2023-12-07 10:24:47 +00:00
if ( rect != d->rect )
2023-12-07 10:24:47 +00:00
{
d->rect = rect;
2023-12-07 10:24:47 +00:00
QSGGeometry::updateTexturedRectGeometry(
&d->geometry, rect, QRectF( 0, 0, 1, 1 ) );
2023-12-07 10:24:47 +00:00
d->geometry.markVertexDataDirty();
markDirty( QSGNode::DirtyGeometry );
}
2023-12-07 10:24:47 +00:00
}