draw all models from vector,

window cosmetic,
next:
texture,
calculate modelmatrix from parent
This commit is contained in:
Anakin
2016-12-31 12:31:38 +01:00
parent c96d05decb
commit ee8705f9e4
8 changed files with 76 additions and 23 deletions

View File

@@ -6,6 +6,13 @@
#include <QOpenGLTexture>
#include <QVector>
struct DrawInformation {
unsigned int offset;
unsigned int size;
unsigned int textureIndex;
QMatrix4x4 modelMatrix;
};
class GeometryEngine : protected QOpenGLFunctions
{
public:
@@ -16,9 +23,7 @@ private:
QOpenGLBuffer m_arrayBuf;
QOpenGLBuffer m_indexBuf;
QVector<QOpenGLTexture*> m_textures;
QVector<Model*>* m_models = Q_NULLPTR;
QVector<std::string>* m_textureNames = Q_NULLPTR; //TODO: remove, use it local and only hold the textures itself
QVector<DrawInformation> m_drawList;
void initCubeGeometry();
void initTexture();