diff options
author | ccolin | 2021-01-03 12:30:16 +0100 |
---|---|---|
committer | ccolin | 2021-01-03 12:30:16 +0100 |
commit | 928d45c3fbfb6b00d8e0b79b63934ebd080b9456 (patch) | |
tree | 9e6b4f457d3c3130aa57b183f868e378e9810f5a /src/opengl_mesh.hh | |
parent | 8ad1cf1b89b8acae55e36d6bd4562dffd1bcc714 (diff) |
refactor drawing code
Diffstat (limited to 'src/opengl_mesh.hh')
-rw-r--r-- | src/opengl_mesh.hh | 7 |
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; }; |