35 lines
664 B
C++
35 lines
664 B
C++
#pragma once
|
|
#include "..\Header\FileInterface.h"
|
|
#include <QOpenGLFunctions>
|
|
#include <QOpenGLShaderProgram>
|
|
#include <QOpenGLBuffer>
|
|
#include <QOpenGLTexture>
|
|
#include <QVector>
|
|
|
|
struct DrawInformation {
|
|
unsigned int offset;
|
|
unsigned int size;
|
|
unsigned int textureIndex;
|
|
QMatrix4x4 modelMatrix;
|
|
};
|
|
|
|
class GeometryEngine : protected QOpenGLFunctions
|
|
{
|
|
public:
|
|
GeometryEngine();
|
|
virtual ~GeometryEngine();
|
|
|
|
private:
|
|
QOpenGLBuffer m_arrayBuf;
|
|
QOpenGLBuffer m_indexBuf;
|
|
QVector<QOpenGLTexture*> m_textures;
|
|
QVector<DrawInformation> m_drawList;
|
|
|
|
void initCubeGeometry();
|
|
void initTexture();
|
|
|
|
public:
|
|
void drawGeometry(QOpenGLShaderProgram *program);
|
|
};
|
|
|