-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmyglwidget.h
More file actions
41 lines (33 loc) · 905 Bytes
/
myglwidget.h
File metadata and controls
41 lines (33 loc) · 905 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
#ifndef MYGLWIDGET_H
#define MYGLWIDGET_H
#include <QOpenGLWidget>
#include <QOpenGLFunctions_4_3_Core>
#include <QOpenGLBuffer>
#include <QOpenGLShader>
#include <QOpenGLShaderProgram>
#include <QOpenGLTexture>
#include <QOpenGLVertexArrayObject>
#include <QDir>
class MyGLWidget : public QOpenGLWidget, protected QOpenGLFunctions_4_3_Core
{
QOpenGLVertexArrayObject m_vao;
QOpenGLBuffer *m_vertexBuffer;
QOpenGLBuffer *m_indexBuffer;
QOpenGLShaderProgram *m_computeProgram;
QOpenGLShaderProgram *m_renderProgram;
QOpenGLShader *m_computeShader;
QOpenGLShader *m_fragmentShader;
QOpenGLShader *m_vertexShader;
QOpenGLTexture *m_texture;
float roll;
public:
MyGLWidget(QWidget *parent);
~MyGLWidget();
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
signals:
public slots:
};
#endif // MYGLWIDGET_H