aboutsummaryrefslogtreecommitdiff
path: root/src/opengl_mesh.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl_mesh.hh')
-rw-r--r--src/opengl_mesh.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl_mesh.hh b/src/opengl_mesh.hh
index 5038816..7cffece 100644
--- a/src/opengl_mesh.hh
+++ b/src/opengl_mesh.hh
@@ -4,15 +4,18 @@
#include <QMatrix4x4>
#include <QVector>
#include <QOpenGLTexture>
+#include <QOpenGLShaderProgram>
+#include <QOpenGLExtraFunctions>
struct OpenGLMesh {
GLuint vao, vbo;
unsigned nverts;
- QMatrix4x4 mat;
QOpenGLTexture *tex;
+ QOpenGLShaderProgram *program;
- OpenGLMesh(QVector<float> verts, QOpenGLTexture *tex);
+ OpenGLMesh(QVector<float> verts, QOpenGLTexture *tex, QOpenGLShaderProgram *program);
+ void draw(QOpenGLExtraFunctions *f, const QMatrix4x4 &mat) const;
};