diff options
author | jjesswan <90643397+jjesswan@users.noreply.github.com> | 2024-05-09 15:13:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 15:13:41 -0400 |
commit | f846ddba00aee29675f0bd4f5dbc87a94a422368 (patch) | |
tree | 65a857125b91502974bceb40e24c1c7eff4bad59 /src/glwidget.h | |
parent | 72bcf6a346dfcaeaac9520d8c524711192e77c3d (diff) | |
parent | 675391d07f50d0067e7bab983433c6d86f5f8256 (diff) |
Merge pull request #3 from Seb-Park/foam2
Foam2 merge -- foam, skybox
Diffstat (limited to 'src/glwidget.h')
-rwxr-xr-x | src/glwidget.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/glwidget.h b/src/glwidget.h index 810829a..006f027 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 @@ -45,6 +51,10 @@ private: void initCaustics(); void paintCaustics(); + TextureData loadTextureFromFile(const char *path); + GLuint loadCubeMap(std::vector<const char*> textureFiles); + + private slots: // Physics Tick void tick(); @@ -57,6 +67,10 @@ private: Shader *m_texture_shader; Shader *m_colorShader; + Shader *m_foamShader; + Shader *m_skyboxShader; + + GLuint m_fullscreen_vbo; GLuint m_fullscreen_vao; @@ -79,6 +93,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 @@ -95,4 +114,6 @@ private: bool m_rightCapture; SelectMode m_rightClickSelectMode; int m_lastSelectedVertex = -1; + + skybox m_skybox; }; |