-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglrenderthread.h
More file actions
47 lines (35 loc) · 903 Bytes
/
Copy pathglrenderthread.h
File metadata and controls
47 lines (35 loc) · 903 Bytes
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
45
46
47
#ifndef GLRENDERTHREAD_H
#define GLRENDERTHREAD_H
#include <QThread>
#include <QGLWidget>
#include <QFileSystemWatcher>
class QGLFrame;
class QSize;
class QGLShaderProgram;
class QGLShader;
class QGLRenderThread : public QThread
{
Q_OBJECT
public:
explicit QGLRenderThread(QGLFrame *parent = 0);
void resizeViewport(const QSize &size);
void run(void);
void stop(void);
void LoadShader();
protected:
void GLInit(void);
void GLResize(int width, int height);
void paintGL(void);
private:
bool doRendering, doResize, doReloadShader;
int w, h, FrameCounter;
QGLFrame *GLFrame;
QGLShaderProgram *ShaderProgram;
QGLShader *VertexShader, *FragmentShader;
QString vshader, fshader;
QFileSystemWatcher *watcher;
signals:
public slots:
void reloadShader();
};
#endif // GLRENDERTHREAD_H