GeometryEngine.h 657 Bytes
Newer Older
Anakin's avatar
Anakin committed
1
#pragma once
Anakin's avatar
Anakin committed
2
#include "..\Header\FileInterface.h"
3 4 5
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QOpenGLBuffer>
Anakin's avatar
Anakin committed
6
#include <QOpenGLTexture>
Anakin's avatar
Anakin committed
7
#include <QVector>
8 9 10 11

class GeometryEngine : protected QOpenGLFunctions
{
public:
Anakin's avatar
Anakin committed
12 13
	GeometryEngine();
	virtual ~GeometryEngine();
14 15

private:
Anakin's avatar
Anakin committed
16 17 18 19
	QOpenGLBuffer m_arrayBuf;
	QOpenGLBuffer m_indexBuf;
	QVector<QOpenGLTexture*> m_textures;

Anakin's avatar
Anakin committed
20 21 22
	QVector<Model*>* m_models = Q_NULLPTR;
	QVector<std::string>* m_textureNames = Q_NULLPTR;	//TODO: remove, use it local and only hold the textures itself

Anakin's avatar
Anakin committed
23 24 25
	void initCubeGeometry();
	void initTexture();

Anakin's avatar
Anakin committed
26 27
public:
	void drawGeometry(QOpenGLShaderProgram *program);
28 29
};