From 8193f9e0ecc0a7592310e1c26310ba502c091374 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 22 Jan 2020 16:01:53 +0100 Subject: Move QOpenGLVertexArrayObject from QtGui to QtOpenGL Task-number: QTBUG-74409 Change-Id: I6442693ca2b28b3a66f0f4fb41843e1e404df32b Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglvertexarrayobject.h | 111 ------------------------------ 1 file changed, 111 deletions(-) delete mode 100644 src/gui/opengl/qopenglvertexarrayobject.h (limited to 'src/gui/opengl/qopenglvertexarrayobject.h') diff --git a/src/gui/opengl/qopenglvertexarrayobject.h b/src/gui/opengl/qopenglvertexarrayobject.h deleted file mode 100644 index b81ae6a2a9..0000000000 --- a/src/gui/opengl/qopenglvertexarrayobject.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sean Harmer -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui 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 QOPENGLVERTEXARRAYOBJECT_H -#define QOPENGLVERTEXARRAYOBJECT_H - -#include - -#ifndef QT_NO_OPENGL - -#include -#include - -QT_BEGIN_NAMESPACE - -class QOpenGLVertexArrayObjectPrivate; - -class Q_GUI_EXPORT QOpenGLVertexArrayObject : public QObject -{ - Q_OBJECT - -public: - explicit QOpenGLVertexArrayObject(QObject* parent = nullptr); - ~QOpenGLVertexArrayObject(); - - bool create(); - void destroy(); - bool isCreated() const; - GLuint objectId() const; - void bind(); - void release(); - - class Q_GUI_EXPORT Binder - { - public: - inline Binder(QOpenGLVertexArrayObject *v) - : vao(v) - { - Q_ASSERT(v); - if (vao->isCreated() || vao->create()) - vao->bind(); - } - - inline ~Binder() - { - release(); - } - - inline void release() - { - vao->release(); - } - - inline void rebind() - { - vao->bind(); - } - - private: - Q_DISABLE_COPY(Binder) - QOpenGLVertexArrayObject *vao; - }; - -private: - Q_DISABLE_COPY(QOpenGLVertexArrayObject) - Q_DECLARE_PRIVATE(QOpenGLVertexArrayObject) - Q_PRIVATE_SLOT(d_func(), void _q_contextAboutToBeDestroyed()) - QOpenGLVertexArrayObject(QOpenGLVertexArrayObjectPrivate &dd); -}; - -QT_END_NAMESPACE - -#endif - -#endif // QOPENGLVERTEXARRAYOBJECT_H -- cgit v1.2.3