42 lines
568 B
C++
42 lines
568 B
C++
#ifndef MAPVIEW_H
|
|
#define MAPVIEW_H
|
|
|
|
#include <QOpenGLWidget>
|
|
#include <QOpenGLFunctions>
|
|
#include <QOpenGLShaderProgram>
|
|
#include <QBasicTimer>
|
|
|
|
class Geometry;
|
|
|
|
class MapView : public QOpenGLWidget, protected QOpenGLFunctions {
|
|
|
|
private:
|
|
|
|
QMatrix4x4 projection;
|
|
QOpenGLShaderProgram program;
|
|
Geometry* geo;
|
|
|
|
QBasicTimer timer;
|
|
|
|
public:
|
|
|
|
MapView(QWidget* parent = 0);
|
|
|
|
protected:
|
|
|
|
void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
|
|
|
|
void initializeGL();
|
|
|
|
void paintGL();
|
|
|
|
void resizeGL(int width, int height);
|
|
|
|
private:
|
|
|
|
void draw();
|
|
|
|
};
|
|
|
|
#endif // MAPVIEW_H
|