summaryrefslogtreecommitdiffstats
path: root/src/render/jobs/loadtexturedatajob_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-02-19 13:34:13 +0100
committerPaul Lemire <paul.lemire@kdab.com>2019-03-04 14:52:38 +0000
commit0a8742532fb1697203dd3d7d9c1c28b4cb052e2d (patch)
treee417fec5065df3d7e8d66f237ba56fb39435185d /src/render/jobs/loadtexturedatajob_p.h
parent299c0bc6d2ea5817ba32b3724290c349789be11b (diff)
Rework internal Texture Handling
- Remove internal GLTexture sharing - Remove dataFunctor data sharing - Simplify the overall texture process: 1) Look for dirty textures (either a property on QTexture or a referenced QTextureImage has changed) 2) Update GL Resources - Create a GLTexture for a given Texture if it doesn't exist - Update GLTexture to reflect Texture state - Perform actual GL texture creation and or upload (call functors at this point) - Cleanup GLTextures when matching Texture node has been destroyed This will provide an easier maintenance over time as it drastically simplifies the handling of textures and removes most of the coupling. Furthermore this will make it possible to send texture updates on a QTexture node to update texture content without having to declare QTextureImages which would not have been (or would have been a lot harder) to do. In practice, I doubt most people were even aware of the internal texture sharing in the first place. [ChangeLog][Qt3DRender] Textures: internal data sharing removed Change-Id: I02867c8105e29eb1e193884e3899062f795f32f4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/jobs/loadtexturedatajob_p.h')
-rw-r--r--src/render/jobs/loadtexturedatajob_p.h94
1 files changed, 0 insertions, 94 deletions
diff --git a/src/render/jobs/loadtexturedatajob_p.h b/src/render/jobs/loadtexturedatajob_p.h
deleted file mode 100644
index 607068712..000000000
--- a/src/render/jobs/loadtexturedatajob_p.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT3DRENDER_RENDER_LOADTEXTUREDATAJOB_H
-#define QT3DRENDER_RENDER_LOADTEXTUREDATAJOB_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <Qt3DCore/qnodeid.h>
-#include <Qt3DCore/qaspectjob.h>
-#include <Qt3DRender/qtexturegenerator.h>
-#include <Qt3DRender/qtextureimagedatagenerator.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-namespace Render {
-
-class NodeManagers;
-
-class LoadTextureDataJob : public Qt3DCore::QAspectJob
-{
-public:
- LoadTextureDataJob(const QTextureGeneratorPtr &texGen);
- LoadTextureDataJob(const QTextureImageDataGeneratorPtr &imgDataGen);
- ~LoadTextureDataJob();
-
- inline void setNodeManagers(NodeManagers *manager) { m_manager = manager; }
-
-protected:
- void run() final;
-
-private:
- QTextureGeneratorPtr m_texGen;
- QTextureImageDataGeneratorPtr m_imgDataGen;
-
- NodeManagers *m_manager;
-};
-
-typedef QSharedPointer<LoadTextureDataJob> LoadTextureDataJobPtr;
-
-} // namespace Render
-
-} // namespace Qt3DRender
-
-QT_END_NAMESPACE
-
-#endif // QT3DRENDER_RENDER_LOADTEXTUREDATAJOB_H