-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreen.h
44 lines (36 loc) · 990 Bytes
/
screen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SCREEN_H
#define SCREEN_H
#include <QGLFunctions>
#include <QGLWidget>
#include <QMouseEvent>
#include <QKeyEvent>
#include <QVector2D>
#include <QGLFramebufferObject>
#include <QWheelEvent>
class Screen : public QGLWidget, private QGLFunctions
{
Q_OBJECT
public:
explicit Screen(QWidget *parent = 0);
virtual void keyPressEvent(QKeyEvent*);
virtual void mouseReleaseEvent(QMouseEvent*);
virtual void mousePressEvent(QMouseEvent*);
virtual void wheelEvent(QWheelEvent*);
void initializeGL();
void paintGL();
void resizeGL(int,int);
public slots:
void quit();
void setStage(const QString& name);
private:
void bounceOnce(QVector2D,QVector2D,float,int);
void glVertex(QVector3D);
QVector2D mousePos();
void resizeFb(int,int);
QGLFramebufferObject* shadowFb;
QGLFramebufferObject* bounceFb;
QGLFramebufferObject* bounceFbPong;
QGLFramebufferObject* synthFb;
QFont debugFont;
};
#endif // SCREEN_H