Sat, 14 Dec 2019 23:00:01 +0200
fixed build
17 | 1 | #pragma once |
2 | #include <QOpenGLWidget> | |
3 | #include <QOpenGLFunctions> | |
4 | #include <QQuaternion> | |
5 | #include "main.h" | |
18 | 6 | #include "gl/common.h" |
17 | 7 | |
8 | class PartRenderer : public QOpenGLWidget, protected QOpenGLFunctions | |
9 | { | |
10 | public: | |
11 | PartRenderer(QWidget* parent = nullptr); | |
12 | protected: | |
13 | void initializeGL() override; | |
14 | void resizeGL(int width, int height) override; | |
15 | void paintGL() override; | |
16 | void mouseMoveEvent(QMouseEvent* event) override; | |
18 | 17 | private slots: |
18 | void setRenderStyle(const gl::RenderStyle newStyle); | |
17 | 19 | private: |
20 | QPointF lastMousePosition; | |
21 | bool initialized = false; | |
18 | 22 | gl::RenderStyle renderStyle = gl::RenderStyle::Normal; |
17 | 23 | QQuaternion rotation; |
24 | void initializeLighting(); | |
25 | }; |