// Copyright (c) 2021. Pascal Syma <pascal@syma.dev> and Antonio Martinez Casadesus <acasadesus@stud.hs-bremen.de>. // All rights reserved. #ifndef OGLWIDGET_H #define OGLWIDGET_H #include <QOpenGLWidget> #include <QOpenGLFunctions> #include <QTimer> class OGLWidget : public QOpenGLWidget, protected QOpenGLFunctions { Q_OBJECT public: OGLWidget(QWidget *parent = 0); ~OGLWidget(); public slots: void stepAnimation(); protected: void initializeGL(); void resizeGL(int w, int h); void paintGL(); protected: QTimer* animtimer; // Timer needed to step animation every x msec int animstep; // Current animation step (used to rotate triangle }; #endif // OGLWIDGET_H