30 lines
657 B
C++
30 lines
657 B
C++
#pragma once
|
|
#include "..\Header\FileInterface.h"
|
|
#include <QOpenGLFunctions>
|
|
#include <QOpenGLShaderProgram>
|
|
#include <QOpenGLBuffer>
|
|
#include <QOpenGLTexture>
|
|
#include <QVector>
|
|
|
|
class GeometryEngine : protected QOpenGLFunctions
|
|
{
|
|
public:
|
|
GeometryEngine();
|
|
virtual ~GeometryEngine();
|
|
|
|
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
|
|
|
|
void initCubeGeometry();
|
|
void initTexture();
|
|
|
|
public:
|
|
void drawGeometry(QOpenGLShaderProgram *program);
|
|
};
|
|
|