From 928d45c3fbfb6b00d8e0b79b63934ebd080b9456 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sun, 3 Jan 2021 12:30:16 +0100 Subject: refactor drawing code --- src/opengl_mesh.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/opengl_mesh.hh') 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 #include #include +#include +#include struct OpenGLMesh { GLuint vao, vbo; unsigned nverts; - QMatrix4x4 mat; QOpenGLTexture *tex; + QOpenGLShaderProgram *program; - OpenGLMesh(QVector verts, QOpenGLTexture *tex); + OpenGLMesh(QVector verts, QOpenGLTexture *tex, QOpenGLShaderProgram *program); + void draw(QOpenGLExtraFunctions *f, const QMatrix4x4 &mat) const; }; -- cgit v1.2.3-70-g09d2