diff options
author | ccolin | 2020-12-28 17:36:45 +0100 |
---|---|---|
committer | ccolin | 2020-12-28 17:36:45 +0100 |
commit | f3a34665978729ef65010ac2a4a9408e27d5bf3e (patch) | |
tree | e8f4d6f2402c9b7113e33684f64b82a98d990313 /src/opengl_widget.hh | |
parent | ef37119f4e94c83a6357ebc0b94a39e4e53b20d7 (diff) |
skybox
Diffstat (limited to 'src/opengl_widget.hh')
-rw-r--r-- | src/opengl_widget.hh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/opengl_widget.hh b/src/opengl_widget.hh index 9259784..5bd4a07 100644 --- a/src/opengl_widget.hh +++ b/src/opengl_widget.hh @@ -7,6 +7,8 @@ #include <QMatrix4x4> #include <QOpenGLFunctions_4_4_Core> #include <QOpenGLShaderProgram> +#include <QOpenGLVertexArrayObject> +#include <QOpenGLBuffer> #define FOV 70 @@ -14,12 +16,21 @@ class OpenGLWidget : public QOpenGLWidget, public QOpenGLFunctions_4_4_Core { Q_OBJECT - GLuint pos_attr, proj_attr, view_attr, model_attr; - - QMatrix4x4 rot, rot_start; + QMatrix4x4 rot, rot_start, proj; GLfloat cam_dist = 1; QPoint mouse_pos; + QOpenGLShaderProgram main_program; + QOpenGLShaderProgram skybox_program; + // QOpenGLTexture *skybox_tex; + GLuint skybox_tex; + // QOpenGLVertexArrayObject skybox_vao; + // QOpenGLBuffer skybox_vbo; + GLuint skybox_vao; + GLuint skybox_vbo; + + void loadSkybox(); + protected: virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); |