-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenglcontext.h
44 lines (33 loc) · 978 Bytes
/
openglcontext.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 GLWIDGET277_H
#define GLWIDGET277_H
#include <QOpenGLWidget>
#include <QOpenGLFunctions_3_2_Core>
#include <QOpenGLFunctions_3_2_Compatibility>
#include <QTimer>
class OpenGLContext
: public QOpenGLWidget,
public QOpenGLFunctions_3_2_Core
// public QOpenGLFunctions_3_2_Compatibility
{
Q_OBJECT
private:
/// Timer for drawing new frames
QTimer timer;
protected:
/*** AUTOMATIC TESTING: DO NOT MODIFY ***/
/*** If true, save a test image and exit */
/***/ bool autotesting;
public:
OpenGLContext(QWidget *parent);
~OpenGLContext();
void debugContextVersion();
void printGLErrorLog();
void printLinkInfoLog(int prog);
void printShaderInfoLog(int shader);
private slots:
/*** AUTOMATIC TESTING: DO NOT MODIFY ***/
/***/ void saveImageAndQuit();
/// Slot that gets called ~60 times per second
void timerUpdate();
};
#endif // GLWIDGET277_H