GeometryEngine.h 466 Bytes
Newer Older
Anakin's avatar
Anakin committed
1
#pragma once
2 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
	void initCubeGeometry();
	void initTexture();

Anakin's avatar
Anakin committed
23 24
public:
	void drawGeometry(QOpenGLShaderProgram *program);
25 26
};