summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/managers/glresourcemanagers.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2017-06-02 13:28:45 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-12-18 10:35:17 +0100
commit24dd795de773c00d5cfe64e887ce63719db88015 (patch)
tree2ec97f258decc8daa99839b95441d572fbee26b7 /src/render/renderers/opengl/managers/glresourcemanagers.cpp
parent1776037b0443dc57d59afe0772a83b1d47aced14 (diff)
Add dedicated managers holder for GL Resources
That way NodeManagers only refers to managers holding nodes (so can be used by aspect and all renderer) and GLResourceManagers refers to renderer specific resources. Note: the Scene2D resourceaccessor was making direct access to GL resource through the managers, this has been commented and will be restored later Change-Id: Ic32784f60eac35aab8c066d1769f078639fa25b8
Diffstat (limited to 'src/render/renderers/opengl/managers/glresourcemanagers.cpp')
-rw-r--r--src/render/renderers/opengl/managers/glresourcemanagers.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/render/renderers/opengl/managers/glresourcemanagers.cpp b/src/render/renderers/opengl/managers/glresourcemanagers.cpp
new file mode 100644
index 000000000..e3be4c7af
--- /dev/null
+++ b/src/render/renderers/opengl/managers/glresourcemanagers.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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$
+**
+****************************************************************************/
+
+#include "glresourcemanagers_p.h"
+#include <QOpenGLVertexArrayObject>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+
+namespace Render {
+
+
+GLResourceManagers::GLResourceManagers()
+ : m_glBufferManager(new GLBufferManager())
+ , m_glTextureManager(new GLTextureManager())
+ , m_glFenceManager(new GLFenceManager())
+ , m_vaoManager(new VAOManager())
+{
+}
+
+GLResourceManagers::~GLResourceManagers()
+{
+ delete m_vaoManager;
+ delete m_glFenceManager;
+ delete m_glTextureManager;
+ delete m_glBufferManager;
+}
+
+} // Render
+
+} // Qt3DRender
+
+QT_END_NAMESPACE