summaryrefslogtreecommitdiff
path: root/src/glwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glwidget.h')
-rwxr-xr-xsrc/glwidget.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/glwidget.h b/src/glwidget.h
index f77c4ee..d992ab6 100755
--- a/src/glwidget.h
+++ b/src/glwidget.h
@@ -1,8 +1,8 @@
#pragma once
-#ifdef __APPLE__
-#define GL_SILENCE_DEPRECATION
-#endif
+#include "skybox.h"
+#include <GL/glew.h>
+
#include "arap.h"
#include "graphics/camera.h"
@@ -13,6 +13,12 @@
#include <QTimer>
#include <memory>
+struct TextureData{
+ GLuint textureID;
+ int width;
+ int height;
+};
+
class GLWidget : public QOpenGLWidget
{
Q_OBJECT
@@ -46,6 +52,10 @@ private:
void initCaustics();
void paintCaustics();
+ TextureData loadTextureFromFile(const char *path);
+ GLuint loadCubeMap(std::vector<const char*> textureFiles);
+
+
private slots:
// Physics Tick
void tick();
@@ -59,6 +69,10 @@ private:
Shader *m_causticsShader;
Shader *m_colorShader;
+ Shader *m_foamShader;
+ Shader *m_skyboxShader;
+
+
GLuint m_fullscreen_vbo;
GLuint m_fullscreen_vao;
@@ -86,6 +100,11 @@ private:
float m_vertexSelectionThreshold;
float m_vSize;
+ // FOAM
+ GLuint m_halftone_tex;
+ GLuint m_foam_tex;
+
+
// Timing
QElapsedTimer m_deltaTimeProvider; // For measuring elapsed time
QTimer m_intervalTimer; // For triggering timed events
@@ -102,4 +121,6 @@ private:
bool m_rightCapture;
SelectMode m_rightClickSelectMode;
int m_lastSelectedVertex = -1;
+
+ skybox m_skybox;
};