improve opengl portability
This commit is contained in:
parent
29a745a6ec
commit
934e6b2592
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user