-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathogl_funcs.h
44 lines (32 loc) · 811 Bytes
/
ogl_funcs.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 OGL_FUNCS_H
#define OGL_FUNCS_H
#include <QGLWidget>
#include <QGLFunctions>
#include <QTimer>
#include "texture_holder.h"
class OGL_funcs :
public QGLWidget,
public QGLFunctions
{
Q_OBJECT
public:
OGL_funcs(QWidget *parent = 0);
public slots:
void doRenderWorkAnywhere();
private:
QTimer timer;
QTimer timerForFrameBuffer;
TextureHolder aTextureHolder;
void createBufObjectsForVertices();
void setAttribs();
void initializeGL();
void paintGL();
void resizeGL(int w, int h);
void textureSettings();
void generateTextures();
void keyPressEvent(QKeyEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void wheelEvent(QWheelEvent *event) override;
void render();
};
#endif // OGL_FUNCS_H