LibrePCB Developers Documentation
openglobject.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_EDITOR_OPENGLOBJECT_H
21#define LIBREPCB_EDITOR_OPENGLOBJECT_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include <QtCore>
27#include <QtOpenGL>
28#include <QtWidgets>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34namespace editor {
35
36/*******************************************************************************
37 * Class OpenGlObject
38 ******************************************************************************/
39
44public:
45 // Constructors / Destructor
46 OpenGlObject() noexcept = default;
47 OpenGlObject(const OpenGlObject& other) noexcept = default;
48 virtual ~OpenGlObject() noexcept = default;
49
50 // General Methods
51 virtual void draw(QOpenGLFunctions& gl,
52 QOpenGLShaderProgram& program) noexcept = 0;
53};
54
55/*******************************************************************************
56 * End of File
57 ******************************************************************************/
58
59} // namespace editor
60} // namespace librepcb
61
62#endif
Represents one 3D object in an OpenGL 3D model.
Definition: openglobject.h:43
virtual void draw(QOpenGLFunctions &gl, QOpenGLShaderProgram &program) noexcept=0
OpenGlObject() noexcept=default
Definition: occmodel.cpp:77