-
Notifications
You must be signed in to change notification settings - Fork 2
/
isosurface.hpp
59 lines (41 loc) · 1.08 KB
/
isosurface.hpp
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
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef gl_compute_isosurface_hpp_included__
#define gl_compute_isosurface_hpp_included__
#include <GL/gl.h>
#include <GL/glu.h>
#include <QtGui>
#include <QGLWidget>
#include <QSize>
#include "shader.hpp"
class RenderWidget : public QGLWidget
{
Q_OBJECT
public:
RenderWidget(const QGLFormat &format);
virtual ~RenderWidget() {}
protected:
Program progMesh, progCompute;
GLuint vao, ssboVert, ssboCount, ssboTables;
GLuint vertCount;
void compileShaders();
void updateIsosurface();
virtual void initializeGL();
virtual void resizeGL(int width, int height);
virtual void paintGL();
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void wheelEvent(QWheelEvent *event);
virtual void keyPressEvent(QKeyEvent * event);
QSize curSize, texSize;
double aspect;
QPoint lastPos;
float scale;
float rotateX, rotateY;
float isoValue;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget* gl);
};
#endif // gl_compute_isosurface_hpp_included__