From 7fbe0814d52ba861a02b0560d4e6872845ef241e Mon Sep 17 00:00:00 2001 From: ccolin Date: Tue, 22 Dec 2020 13:15:23 +0100 Subject: initial commit --- src/opengl_widget.hh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/opengl_widget.hh (limited to 'src/opengl_widget.hh') diff --git a/src/opengl_widget.hh b/src/opengl_widget.hh new file mode 100644 index 0000000..48cb276 --- /dev/null +++ b/src/opengl_widget.hh @@ -0,0 +1,35 @@ +#ifndef OPENGL_WIDGET_HH +#define OPENGL_WIDGET_HH + +#include "opengl_mesh.hh" + +#include +#include +#include +#include + +#define FOV 70 + + +class OpenGLWidget : public QOpenGLWidget, public QOpenGLFunctions_4_4_Core { + Q_OBJECT + + GLuint pos_attr, proj_attr, view_attr, model_attr; + +public: + static OpenGLWidget *instance; + + QVector meshes; + + OpenGLWidget(QWidget *parent=nullptr); + ~OpenGLWidget(); + void initializeGL() override; + void resizeGL(int w, int h) override; + void paintGL() override; + +signals: + void initialized(); +}; + + +#endif -- cgit v1.2.3-70-g09d2