diff options
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); |