diff options
author | ccolin | 2021-01-02 16:00:44 +0100 |
---|---|---|
committer | ccolin | 2021-01-02 16:00:44 +0100 |
commit | 934e6b25927e13ad69a63c30b409b024c69d50f4 (patch) | |
tree | 8e0b60d2c25e856be2596782e681f305ad5043fd /src | |
parent | 29a745a6ec9c3b8f6104c20d7dabdce604852352 (diff) |
improve opengl portability
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl_mesh.cc | 2 | ||||
-rw-r--r-- | src/opengl_widget.hh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl_mesh.cc b/src/opengl_mesh.cc index f2f0981..01a73ff 100644 --- a/src/opengl_mesh.cc +++ b/src/opengl_mesh.cc @@ -7,7 +7,7 @@ OpenGLMesh::OpenGLMesh(QVector<float> verts, QOpenGLTexture *tex) :tex(tex) { OpenGLWidget::instance->makeCurrent(); - QOpenGLFunctions_4_4_Core *glf = OpenGLWidget::instance; + QOpenGLExtraFunctions *glf = OpenGLWidget::instance; nverts = verts.size() / 8; glf->glGenVertexArrays(1, &vao); glf->glBindVertexArray(vao); diff --git a/src/opengl_widget.hh b/src/opengl_widget.hh index 5ee1057..785a17f 100644 --- a/src/opengl_widget.hh +++ b/src/opengl_widget.hh @@ -5,7 +5,7 @@ #include <QOpenGLWidget> #include <QMatrix4x4> -#include <QOpenGLFunctions_4_4_Core> +#include <QOpenGLExtraFunctions> #include <QOpenGLShaderProgram> #include <QOpenGLVertexArrayObject> #include <QOpenGLBuffer> @@ -13,7 +13,7 @@ #define FOV 70 -class OpenGLWidget : public QOpenGLWidget, public QOpenGLFunctions_4_4_Core { +class OpenGLWidget : public QOpenGLWidget, public QOpenGLExtraFunctions { Q_OBJECT QMatrix4x4 rot, rot_start, proj; |