add exe icon,
signal-slot for openFile, resetView on openFile, cleanup when open a new file, triangulate quad poly now correctly, more not working, bug from previous version, next: fix 5,6,.. triangulation, triClothMan, IC Helmet, still buggy,
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "..\Header\FileInterface.h"
|
||||
#include <QObject>
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QOpenGLShaderProgram>
|
||||
#include <QOpenGLBuffer>
|
||||
@@ -13,8 +14,10 @@ struct DrawInformation {
|
||||
QMatrix4x4 modelMatrix;
|
||||
};
|
||||
|
||||
class GeometryEngine : protected QOpenGLFunctions
|
||||
class GeometryEngine : public QObject, protected QOpenGLFunctions
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GeometryEngine();
|
||||
virtual ~GeometryEngine();
|
||||
@@ -26,9 +29,14 @@ private:
|
||||
QVector<DrawInformation> m_drawList;
|
||||
|
||||
void loadTexture(const char* filePath);
|
||||
void clearData();
|
||||
|
||||
public:
|
||||
public slots:
|
||||
void loadFile(const char* filePath);
|
||||
void drawGeometry(QOpenGLShaderProgram *program);
|
||||
|
||||
signals:
|
||||
void requestResetView();
|
||||
|
||||
};
|
||||
|
||||
|
@@ -19,4 +19,6 @@ private slots:
|
||||
void aboutFile();
|
||||
void aboutTool();
|
||||
|
||||
signals:
|
||||
void loadFile(const char*);
|
||||
};
|
||||
|
@@ -50,9 +50,7 @@ protected:
|
||||
private:
|
||||
void initShaders();
|
||||
|
||||
public:
|
||||
void openFile(const char* filePath);
|
||||
|
||||
|
||||
private slots:
|
||||
void resetView();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user